Date picker with jQuery UI
Date picker with jQuery UI
Hi, am I the only one experiencing an error with the date picker?
Example: https://editor.datatables.net/examples/dates/dates.html
When I select "DataTables" as the framework, everything works fine.
However, when I select "jQuery UI" as the framework, the direct selection of a month or year in the date picker no longer works. The selection box flashes briefly and then disappears immediately.
This issue occurs with the Firefox browser (143.0.3).
Chrome (140.0.7339.208) doesn’t seem to be affected.
This question has an accepted answers - jump to answer
Answers
No you aren't the only one - I'm seeing that as well. Thanks for letting me know - I'll post back when I've got a fix.
Allan
Could you try the following in place of the
dataTables.jqueryui.jsfile from the download package please - it should fix the issue:Allan
Hello Allan, sorry for the late reply!
As far as I can tell, your fix works.
The select boxes now remain visible. I haven’t noticed any side effects, though I also wasn’t quite sure what exactly to look for
Thanks a lot for your quick work!
Ilja
Hi Ilja,
The problem was with the focus capture. jQuery UI tries to keep the focus inside the dialouge box, which is a good idea, but the date picker is added to the document outside of it.
So what I did was to disable jQuery UI's focus capture, and use Editor's, which does account for the picker.
Allan
Hi Allan,
Is it possible that the same (or at least a similar) issue occurs when I use inline editing for tag fields? Clicking on 'Add' expands the selection list. As soon as I select an entry from the list, the tag editor disappears without saving the new value.
Ilja
Hi Ilja,
I don't think so as there is no jQuery UI focus capture when doing inline editing.
Are you able to give me a link to a page showing the issue so I can check it out please?
Thanks,
Allan