Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker 'disappears' when choosing month or year, preventing date selection #230

Closed
mtmacdonald opened this issue Jan 6, 2015 · 12 comments

Comments

@mtmacdonald
Copy link

On branch master, using either Firefox or Internet Explorer (but not Chrome), it is not possible to use the month or year selectors. When clicking the month or year, the datepicker 'disappears', preventing selection. In fact, clicking anywhere outside one of the day buttons hides the datepicker.

The demo page does not exhibit this issue, but appears to be a different, unspecified, version.

radiac added a commit to radiac/Pikaday that referenced this issue Jan 6, 2015
Changes in Pikaday#166 broke the click handler's detection of clicks within the
pikaday element; for example, clicking on the date drop-downs, as reported in
issues Pikaday#224 and Pikaday#230.

This change adds the original conditions to the patch in Pikaday#166. This fixes
the introduced bug, while leaving the fixes for child elements in place.
radiac added a commit to radiac/Pikaday that referenced this issue Jan 12, 2015
In IE, a click in the pika div will make the input field lose focus. Previously, _onInputBlur did not test for this, so a click in the pika div would result in it closing.

This commit adds a check to see if document.activeElement is within the pika div, and if so does not allow pika to hide. IE sets this variable to the newly-focused element before the blur event fires;

IE sets document.activeElement to the newly-focused element before the blur event fires; this commit adds a check to see if the clicked element is within the pika div, and if so ignores the blur event. Other browsers correctly set the focused element to body before blur, so will not be affected by this change.

Tested in IE 7 (Win XP), 8-10 (Win 7), 11 (Win 8), latest firefox, chrome, opera
rikkert added a commit that referenced this issue Jan 13, 2015
Fix for bug introduced in #166; fixes #224, #230
@bernhardh
Copy link

For me, this issue also appears on the demo page AND on chrome as well.

@rikkert
Copy link
Member

rikkert commented Jan 14, 2015

Fixed

@rikkert rikkert closed this as completed Jan 14, 2015
@mderazon
Copy link

Awesome library,
Love it when you download an open source project, encounter an issue and see that it was just fixed 👍

Can you please publish to npm / bower ?

Thanks !

@rikkert
Copy link
Member

rikkert commented Jan 21, 2015

Consider it done.

On Wed, Jan 21, 2015 at 10:38 AM, Michael Derazon notifications@github.com
wrote:

Awesome library,
Love it when you download an open source project, encounter an issue and
see that it was just fixed [image: 👍]

Can you please publish to npm / bower ?

Thanks !


Reply to this email directly or view it on GitHub
#230 (comment).

@eliasib13
Copy link

I'm using this datepicker with Ionic Framework to incorporate it in my app, but I still have this problem: when I tap on it, the datepicker closes.

Another thing I've noticed is that when I tap on the picker (a day, a button, or whatever), the tap is caught by the datepicker (if I tap a day, the date is right selected; if I tap next month, when I reopen the picker it shows the next month), but also is caught as a tap on the page; so, for example, if I have a button behind the picker and I click the picker, the picker does what it should and also the button is clicked. This second interpretation could be the fact which is closing the picker, or it just could be thing of the navigator (chrome).

Maybe this can help to fix, and I'd be very thankful 👍

@infacq
Copy link

infacq commented Mar 5, 2015

this is still happening. You can test it on example weeknumber.html. I run it locally without web server on my pc

@rikkert
Copy link
Member

rikkert commented Mar 5, 2015

try the latest released version.

@infacq
Copy link

infacq commented Mar 5, 2015

i tried it with latest release

@dgwalton
Copy link

dgwalton commented Apr 3, 2015

This issue occurs for me only on Windows 8.1 Chrome. All other browser/OS combinations work. Using Chrome Version 41.0.2272.118 m.

@skarkkai-p
Copy link

Happens for me with Pikaday 1.3.2 but not 1.3.1 in current Chrome but not Firefox, both on Ubuntu 14.04.

@goggledefogger
Copy link

Still happening for me too, Windows 8.1 Chrome. Any chance of another fix?

@8lall0
Copy link

8lall0 commented Dec 15, 2017

Still happening to me. Win 10, chrome latest. Please help me, this library is wonderful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants