Closed eumend closed 8 years ago
The picker doesn't currently update the disabled dynamically, because this hasn't been implemented yet.
But now you have implemented it.
And your workaround looks good (and i wouldn't call it a workaround, i would call it a fix).
So if you send a pull-request with the workaround you have described, I'll merge it.
I actually don't know the API for pickdate, are there other options that can be changed using the set
method?
I need to get reserved dates from a factory (which itself calls a server), and set them up as disabled for the materialize datepicker.
I make the API call and successfully retrieve the dates, which I save to 'disabledDates' (the model datepicker's 'disable' is bound to), but it has no effect on the datepicker. I solved that adding a watcher to the directive (which now disables the dates I retrieve), but is this the intended behaviour? Doesn't the picker support updating the 'disable' model dynamically?
HTML ('booking' equals 'vm' on the controller)
Inside the controller ('Place' is the factory):
The watcher I added as a workaround to the disable dates, right after the 'min' and 'max' watchers: