Datepicker changes a natively disabled input if its calendar is 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>
- Click Disable in 1.5 seconds.
- Open the calendar before the timer fires.
- 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.
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jquery/jquery-ui
-
Selectmenu changes selection after its native select is disabled while openPossibly taken @Xapollon430 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Behavior shared with 1.12 Comp: Datepicker
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Comp: Datepicker Needs info
Difficulty 3/5 1-2 days Newbie friendliness 53/100
-
CSS variable stripped from calls to jQuery .css()Possibly taken A pull request linked to this issue is open or already merged. OpenComp: Effects
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Needs info
Difficulty 4/5 3-5 days Newbie friendliness 55/100
All issues in jquery/jquery-ui
Similar issues
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
coder/claudecode.nvim#588 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
digitalbazaar/http-client#60 ·
-
Ruby: The link in the Blocks lesson points to an external article that isn't at that address anymoreOpen
Difficulty 1/5 Under an hour Newbie friendliness 84/100
TheOdinProject/curriculum#31529 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
topmonks/hlidac-shopu#3687 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ONLYOFFICE/DocumentServer#3912 · 1 comment ·