bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Regression? Datepicker popup does not show in a modal box for 0.11.0

Open dcoraboeuf opened this issue 12 years ago • 11 comments

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 avatar May 25 '14 07:05 dcoraboeuf

@dcoraboeuf please provide a minimal reproduce scenario using http://plnkr.co/

pkozlowski-opensource avatar May 28 '14 17:05 pkozlowski-opensource

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.

dcoraboeuf avatar May 28 '14 18:05 dcoraboeuf

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" />

kanwei avatar May 31 '14 18:05 kanwei

Using is-open the way you show does the trick.

Maybe the documentation could be adapted accordingly?

Thanks.

dcoraboeuf avatar May 31 '14 20:05 dcoraboeuf

+1 for documentation update. It took me a while to find this solution.

Thanks!

pedroxs avatar Jul 21 '14 20:07 pedroxs

I have an error (̀$apply already in progress) in the console with @kanwei solution, see #2548.

Maybe I'm doing something wrong ?

Kevlys avatar Aug 06 '14 08:08 Kevlys

@Kevlys Can you put something in a Plunker to reproduce it? http://plnkr.co/

dcoraboeuf avatar Aug 06 '14 08:08 dcoraboeuf

@dcoraboeuf See http://plnkr.co/edit/ZEvAW1v033aaEBFfiytF

I'v created it from your original plunker.

Kevlys avatar Aug 06 '14 08:08 Kevlys

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.

kencaron avatar Aug 20 '14 20:08 kencaron

Hijacking this issue - a PR with documentation updates about the is-open attribute is welcome.

wesleycho avatar Apr 12 '15 14:04 wesleycho

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.

wesleycho avatar Aug 02 '15 17:08 wesleycho