jquery / jquery/jquery-ui

Datepicker does not fire input "input" event

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

Nobody has claimed this yet.

Behavior shared with 1.12 Comp: Datepicker
Dominant language
JavaScript
Stars
11.3k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

For Datepicker, when a date is selected and the associated input's value is updated, the "change" event is fired, but the "input" event is not. I assume this is because Datepicker was originally created before the "input" event became standard.

Although this has been the longtime behavior, it looks to be a simple change to fire the "input" event at the same time.

https://github.com/jquery/jquery-ui/blob/e21a2543b55680f23aaa7efa38f3288b8e767e7d/ui/widgets/datepicker.js#L1111-L1113

Contributor guide

Open the contributing guide

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.

Research direction

Start in ui/widgets/datepicker.js at the lines linked in the issue, where selecting a date updates the associated input and fires the change event. Make the input event fire with that update, then verify that date selection produces both events.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.