jfmdev / ngComboDatePicker

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

Updating min/max date does not affect the view nor the model #27

Closed jrencz closed 7 years ago

jrencz commented 7 years ago

My use case is:

I have a form with one field and 2 date pickers. Value in the field affects the min-max constraints of both datepickers.

I have min and max date set up initially. It's reflected onto the view when ngComboDatePicker is rendered and that's OK. Then I update the attribute values when user gives input to the field I mentioned before.

I expect the view to update accordingly but nothing happens. Changing ngMinDate and ngMaxDate in runtime does not seem to be supported.

I'd also expect the model to be updated if before ngMinDate it was valid and after change it's out of range. Same for ngMaxDate

jfmdev commented 7 years ago

Hi jrencz,

I have released a new version (1.5.0) which add the attributes ng-min-model and ng-max-model that you can use to change the minimum and maximum dates dynamically.

Regards