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
Base support for web components #83
Comments
@mymth May I ask, whether you already know when the next version of vanillajs-datepicker will be released. Frankly, the above mentioned little issues are complete showstopper for the date selectors in my project currently (and everyone else who might use vanillajs-datepicker in custom elements). Forking just because of minor issues would not make sense at all and all other date pickers I've checked are not as flexible as this one, so using vanillajs-datepicker is currently my only option. At least a very soon beta release including the above mentioned changes (see PR #84) would be really, really helpful. TYVMIA. |
I don't have fixed date yet, but am aiming to get it done by the holidays. Releasing beta version is a good idea. I'll consider it. |
@mymth Many thanks for the merge. |
@mymth FYI: I've overlooked two other places which should be changed. Only the two places in I'll prepare a further PR as soon as #91 is merged. |
Haven't pushed yet, but I already changed it as I found a bug from your change (It's nitpicking level, though—updating on blur didn't work when the picker is hidden by ESC key press) and its fix and the change were related. I did it with adding a function that evaluates By the way, I’ll probably postpone merging #91 until after the next release in order to focus on making other changes planed earlier available as soon as possible. (I merged this issue because it's related to one of them). So you don’t need to PR. Thank you tough for the offer. |
… input is not updated on blur if picker is hidden manually
… input is not updated on blur if picker is hidden manually * Merge branch 'dev'
I'll close this as this was resolved by v1.2.0 release. |
First, many thanks for this great project.
vanillajs-datepicker
is remarkably flexible, but you currently cannot really use it with custom elements in shadow DOM.There are two showstoppers:
Option
container
should not only allow a string vaue but also an HTMLElement instance (asdocument.querySelector
will not find elements in the shadow DOM).These lines here:
vanillajs-datepicker/js/Datepicker.js
Lines 156 to 159 in 4843b2f
could be replaced by:
document.activeElement
is not working if a corresponding input element is in shadow DOM. See:vanillajs-datepicker/js/events/otherListeners.js
Lines 7 to 9 in 4843b2f
Couldn't that just be replaced with the following?
Would be extremely great if these two issues could be fixed. Let me know if I shall prepare a PR. TYVMIA.
The text was updated successfully, but these errors were encountered: