Datepicker changes a natively disabled input if its calendar is open

Open
#2,423 0 comments 0 reactions 0 assignees View on GitHub

@Xapollon430 is already working on this.

Since Nov 12, 2026.

  • #2424 by @Xapollon430 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript, jquery
Domain
frontend

Research direction

Start with the Datepicker selection and disabled-input handling in the jQuery UI source, then inspect its Datepicker tests for coverage of selecting a date after the input becomes disabled while the calendar is open. Add a regression test for the reported steps; done means the date stays May 5 and onSelect does not run. Pull request #2424 is already open against this issue.

Written by the indexing model from the issue text.

Description

Steps to reproduce

With jQuery UI Datepicker and its theme loaded, add the following:

<input id="date" value="05/05/2027">
<button onclick="setTimeout(() => { document.querySelector('#date').disabled = true; }, 1500)">
  Disable in 1.5 seconds
</button>
<script>
  $("#date").datepicker({ dateFormat: "mm/dd/yy" });
</script>
  1. Click Disable in 1.5 seconds.
  2. Open the calendar before the timer fires.
  3. After the input becomes disabled, click May 12.

Expected: the input remains May 5 and onSelect does not run. Actual: the open calendar changes the disabled input to May 12 and runs onSelect.

Reproduced on jQuery UI 1.14.3-pre at dcf1055, with jQuery 4.0.0 and Chrome 157.0.8103.78 on macOS 27.0.1.

Chrome reproduction video

Dominant language
JavaScript
Stars
11.3k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jquery/jquery-ui

All issues in jquery/jquery-ui

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.