-
Notifications
You must be signed in to change notification settings - Fork 6.7k
minDate is ignored/not working in inline datepicker #5672
Comments
If you configure a min date in the config section of angular, then the minDate in the inline datepicker works. But this is no valid workaround for me, because i can't configure the minDate at the start of my webapp. |
This works - the |
@wesleycho : But now you can't switch back. The toggle functionality is broken now. I think the minDate property of the inline datepicker isn't watched and updated. Before you press the button, the minDate of both datepickers is the first day of the year. After pressing the button, the minDate of the popover datepicker is refreshed, but the inline datepicker is not. Please have a look http://plnkr.co/edit/KysM1SZ3kQkcSacrJmcR?p=preview |
Ah, I think I know what is happening - if it does not have a truthy initial value, it will not set a watcher, and thus will not see the change from the toggle. This is a subtle bug - I will fix this after #5676 is merged, should be an easy fix. |
I think this was done by design when thinking about it to reduce watchers, but I think this is a minor optimization in this case and am ok with changing the behavior here. |
I don't know if it's a bug or it's by design. But in the inline datepicker, if a mindate is passed per datepicker-options, the value is ignored. In the datepicker popup, everything works fine. You can reproduce that behaviour on the sample page. I copied it and produced a plunkr.
http://plnkr.co/edit/lMKk9yYkD41QgQvrXbwQ?p=preview
Angular: 1.5.0
UIBS: 1.2.5
Bootstrap: 3.3.6
Browser: latest Firefox
The text was updated successfully, but these errors were encountered: