Regression? Datepicker popup does not show in a modal box for 0.11.0
Hi,
If I have the a datepicker popup element field in a popup, it does not show up in a modal box when using UI Bootstrap 0.11.0:
<input ng-model="myDate" name="myDate" type="text" class="form-control"
datepicker-popup="EEE dd MMM yyyy"
/>
Going back to UI Bootstrap 0.10.0, the popup shows correctly.
@dcoraboeuf please provide a minimal reproduce scenario using http://plnkr.co/
Here you go: http://plnkr.co/edit/2LpEv1KepHCvPqVbudmt In this plunker, if you use UI Bootstrap 0.10.0, you can display the calendar popup by clicking on the text field. But when switching to UI Bootstrap 0.11.0, this does not work any longer.
Regards, Damien.
Commit 2423f6d4 changed this functionality: now is-open controls whether it is shown. You can use it like this now:
<input type="text" is-open="date_open" ng-focus="date_open = true" datepicker-popup="MM/dd/yyyy" ng-model="posting.release_on" required class="form-control" />
Using is-open the way you show does the trick.
Maybe the documentation could be adapted accordingly?
Thanks.
+1 for documentation update. It took me a while to find this solution.
Thanks!
I have an error (̀$apply already in progress) in the console with @kanwei solution, see #2548.
Maybe I'm doing something wrong ?
@Kevlys Can you put something in a Plunker to reproduce it? http://plnkr.co/
@dcoraboeuf See http://plnkr.co/edit/ZEvAW1v033aaEBFfiytF
I'v created it from your original plunker.
I was trying to toggle multiple calendars in a way similar to this plunk: http://plnkr.co/edit/CfclXMYds087Ew10ES3k?p=preview
I'm still not sure why that way is not working, but in any case the ng-focus mentioned by @kanwei did the trick for me, so +1 for a documentation update.
During debugging I turned the ng-click to an actual function that toggle the calendar. If I logged the isCalOpen boolean, it would be what I expected, but come the next digest cycle, it would have been forced back to false.
Hijacking this issue - a PR with documentation updates about the is-open attribute is welcome.
This opens, as can be seen here by pressing down on the keyboard - as mentioned, one can access the is-open attribute, which is now documented.