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

problem displaying the datepicker with option 'c' (centered). #148

Open
toitoibisbis opened this issue Mar 9, 2024 · 0 comments
Open

problem displaying the datepicker with option 'c' (centered). #148

toitoibisbis opened this issue Mar 9, 2024 · 0 comments

Comments

@toitoibisbis
Copy link

toitoibisbis commented Mar 9, 2024

With option 'c' (centered), after clicking the input field, the datepicker immediatly closes again.
This happens when the datepicker is placed over the input element it is connected with.
This is in Chrome: Version 122.0.6261.111 (Official Build) (64-bit). (It runs fine in Firefox).

The problem i think is at the function oneHandler at : picker.el===target.

function oneHandler(e) {
  ...
  var instance = datepickers.filter(function(picker) {
    return picker.calendar.contains(target) || picker.el === target

Because at this point the picker instance is "undefined".
And then the calendar is hidden because of if (!instance).

Except for this, i think it's a wonderful datepicker.
I have no idea how to solve this. Help greatly appreciated!

Greetings, Sebastian

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

1 participant