Open
Description
Versions:
- jQuery 3.6.1
- jquery ui 1.13.2
Prerequisites:
- css applied:
.ui-datepicker { border: 1px solid #ccc; padding: 6px;
Reproduction path:
- Initialize datepicker on input field
Expected behavior:
- .ui-datepicker div is not visible
Current behavior:
- .ui-datepicker div is visible, causing a small box to appear at the bottom of the page
Discussion:
- The div is only visible after initialization and before the first time showing the widget. After hiding the widget, datepicker applies style
display: none
to the div. - This can't be fixed by adding
display: none
to the class ourselves, because the code to show the widget does not apply a differentdisplay
value in-line. It just removes thedisplay: none
inline style. Thus, applyingdisplay: none
in our css results in the widget never being shown. - My conclusion: jquery-ui should set
display: none
on initialisation.