Skip to content

datepicker: ui-datepicker-div always visible after init #2149

Open
@rickhurkens

Description

@rickhurkens

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 different display value in-line. It just removes the display: none inline style. Thus, applying display: none in our css results in the widget never being shown.
  • My conclusion: jquery-ui should set display: none on initialisation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions