Datepicker won't open again with AutoClose option enabled
It seems the event to open the calendar picker is some 'onFocus'. So when you use the Auto Close option the calendar closes, but the focus remains on the input thus not opening again when you click on it to edit again. One way to solve it would be to remove focus of the field when you close the calendar through Auto Close.
The issue can be seen on the example: At the "Input with Auto Close" you select one date, then the Calendar hides, you then have to click outside the input and then click on it again if you want to change the date.
Best Regards,
Pedro Malta
Work around doesn't work for me. This is a rather annoying issue. Looking into forking and fixing it myself.
In dateTime directive on hidePicker instead of triggering a handler, raising event blur() worked for me. That is changing below lines of code
scope.$on('hidePicker', function () {
element.triggerHandler('blur');
});
to
scope.$on('hidePicker', function () {
element.blur();
});
Regards,
+1 im needing this too
+1
+1 Thanks @ab1303 your fix worked for me
@ab1303 @mlemainque This gives to me "element.blur is not a function" (I'm not using jQuery)
This is a working workaround:
scope.$on('hidePicker', function () {
element.triggerHandler('blur');
$timeout(function() {
element[0].blur();
}, 0);
});
obviously you should add "$timeout" in the dependencies.