jfmdev / ngComboDatePicker

Angular directive to select dates using combo boxes
Mozilla Public License 2.0
23 stars 20 forks source link

Support for ngDisabled #28

Closed jrencz closed 7 years ago

jrencz commented 7 years ago

putting ng-disabled="expression" on the element doesn't render the fields disabled if expression evaluates to true

jrencz commented 7 years ago

There's however a way to make fields disabled in a static manner by using ngAttrsDate ngAttrsMonth and ngAttrsYear with value containing {disabled: 'disabled'}

jfmdev commented 7 years ago

Hi JRencz,

Thanks for you contribution.

However I have a quick question: any particular reason while you defined three ngDisabled parameters (one for each combo box) instead of defining only one that will enable/disable the three combo boxes at the same time?

Regards

jrencz commented 7 years ago

Actually there were 2 reasons: one general and one specific to my use case

General one is the feature parity with ngAttrs*

Use case specific is that with certain setting in one of other fields in the form I'm building I need day and month of field B hard-bound to those from field A while the year should stay editable

Other way to achieve this would be to watch for changes in already existing ngAttrs*. How do you think?