There is currently a problem with md-hide-icons="all" and md-open-on-focus used together , when you click on it, the focus remains on the input . But, since there are no icons for clicks, and the focus is already on the input, we cannot open the date.
If you click outside and click outside again , the focus from the input will disappear and it will work fine from there, which should probably be the expected behavior.
But if you do not want this behavior, we can do something to change it!
Now, by looking at the datePicker code, in the closeCalendarPane function, they have
self.calendarPaneOpenedFrom.focus();
which is responsible for maintaining focus on the input. If we delete it, it will lose focus when clicking on it (or selecting a date from the collector), which is what we want. They have code input when openOnFocus is true, but not sure how this helps!
Forked jsfiddle (modified line is at # 31449)
Also, modifying the library code is not what we would normally want to do. So, at the moment, you may have a workaround, for example, accessing md-is-open and removing focus from the input element inside the callback using your favorite method ( jQuery / angular.element or pure JS) [As mentioned by @ quirimmo]
Hope this helps!
source share