These are chat archives for angular/material

10th
Aug 2016
karthickibz
@karthickibz
Aug 10 2016 06:38
hai
Gaurang Ghinaiya
@GaurangGhinaiya
Aug 10 2016 14:41
Hi
How can i disable datepicker textbox?
Sayan Bhattacharya
@tinker20
Aug 10 2016 14:43
add ng-disable to the datepicker
ng-disabled
Gaurang Ghinaiya
@GaurangGhinaiya
Aug 10 2016 14:44
I don't want to disable datepicker
Sayan Bhattacharya
@tinker20
Aug 10 2016 14:44
What do you want to do then? Code snippet please.
Gaurang Ghinaiya
@GaurangGhinaiya
Aug 10 2016 14:45

I only want to disable textbox of datepicker

<md-datepicker md-min-date="vm.minDate" name="actual_arrival_date" md-min-date="vm.minDate" ng-model="vm.inbound_shipment.actual_arrival_date" required md-placeholder="Enter Actual Arrival Date"></md-datepicker>

Sayan Bhattacharya
@tinker20
Aug 10 2016 14:46
disable the text box until a date is selected. right?
Gaurang Ghinaiya
@GaurangGhinaiya
Aug 10 2016 14:47
Nope
See the pic
Sayan Bhattacharya
@tinker20
Aug 10 2016 14:47
?
Gaurang Ghinaiya
@GaurangGhinaiya
Aug 10 2016 14:47
Untitled.png
For that datepicker i use the above code in material design
Sayan Bhattacharya
@tinker20
Aug 10 2016 14:49
If you want to disable the textbox then you should add ng-disabled=!vm.inbound_shipment.actual_arrival_date to the text box code.
Gaurang Ghinaiya
@GaurangGhinaiya
Aug 10 2016 14:50
I can't do that
If i add the disable condition on above code then it will disable all datepicker
Sayan Bhattacharya
@tinker20
Aug 10 2016 14:51
It will disable all the datepickers if the ng-model attached to it is same. It shouldn’t be same
Gaurang Ghinaiya
@GaurangGhinaiya
Aug 10 2016 14:52
I think you didn't get my point
KillerSpaz
@killerspaz
Aug 10 2016 22:02
@GaurangGhinaiya can you use css to target the input element?