-
Notifications
You must be signed in to change notification settings - Fork 721
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 auto closed #232
Comments
Well known on Chrome. |
I'm using Daemonite/material as one of providers for my components library and I'm also getting this auto-close issue for date picker: https://materialdemo.blazorise.com/tests/forms It would be great if it could be fixed. tnx |
Hello, |
There's a workaround for this issue. Tested on Chrome Version 78.0.3904.108 (Official Build) (64-bit) When initializing the datepicker use the following: In this case I'm applying this for all id's that contains inputDatePicker :) Let me know if this helped you. Regards, Sérgio |
Or include these AFTER material.js <script src="https://cdnjs.cloudflare.com/ajax/libs/pickadate.js/3.6.4/compressed/picker.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pickadate.js/3.6.4/compressed/picker.date.js"></script> |
@srebelo001 @djibe I tried both examples and still it doesn't work. Maybe I'm missing something. $(`[id*="${elementId}"]`).on('mousedown', function (event) { event.preventDefault(); }).pickdate({
ok: '',
cancel: 'Clear',
today: 'Today',
closeOnCancel: true,
closeOnSelect: true,
container: 'body',
containerHidden: 'body',
firstDay: 1, // monday
format: 'dd.mm.yyyy',
formatSubmit: formatSubmit,
onClose: function (s) {
// trigger onchange event on the DateEdit component
mutateDOMChange(elementId);
}
}); |
Are you sure this markup doesn't work ?
And
|
OK everyone I fixed it. Replace the official material.js by my new version : The picker is not autoclosing. To remove the systematic readonly attribute, you can set
|
@djibe I will try the fix tonight when I get back home. Will let you know |
@djibe I tried your script and the picker is now working. Can we know what you changed to make it work? |
I copied code from latest pickadate version (picker and picker.date) to material.js. I'm struggling trying to build material from Github repo. |
Easier way is to download Material 2 from my fork : https://github.com/djibe/material/tree/master |
Thats essentially what I plan to do. Ther's no reason to fix old bootstrap fork. Thank you for all the effort so far! |
This question is repeated in Issues. Use my fork instead : https://djibe.github.io/material/docs/4.5/material/pickers/ |
When I click on an input to show the date picker, it is shown and hidden automatically.
The text was updated successfully, but these errors were encountered: