Opened 11 years ago

Last modified 7 years ago

#8873 open bug

Datepicker: Date not updated correctly when yearRange used and initial value not in yearRange

Reported by: tweek Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

Conditions:

  1. yearRange is specified
  2. initial value for date in field is outside the specified yearRange
  3. year value in date picker is not changed from default

Example: http://jsfiddle.net/dLugB/3/

In the above example, I have set the value of the input field to 1 Jan 1970. The yearRange is specified as 2012:2022. When clicking on the input field, the date picker shows the calendar for Jan 2012 and a date can be selected. However, only the date is updated, and the year value remains the same as the initial field value unless the year is changed from the default value of 2012 in the date picker.

I'm using version 1.9.1 locally, but have set the example up with version 1.9.2.

Change History (7)

comment:1 Changed 11 years ago by tj.vantoll

Milestone: 1.10.01.11.0
Status: newopen
Summary: Year not updated correctly when yearRange used and initial value not in yearRangeDatepicker: Year not updated correctly when yearRange used and initial value not in yearRange

Confirmed this is still an issue in master and minified the test case a bit - http://jsfiddle.net/tj_vantoll/C3bjA/.

comment:2 Changed 10 years ago by tj.vantoll

#8899 is a duplicate of this ticket.

comment:3 Changed 10 years ago by tj.vantoll

Summary: Datepicker: Year not updated correctly when yearRange used and initial value not in yearRangeDatepicker: Date not updated correctly when yearRange used and initial value not in yearRange

Another good test case from #8899 - http://jsfiddle.net/wbednarski/45mLv/. This looks to be a problem any time the initial value of the date is not within the yearRange. In this test case the initial value is the default of today's date.

comment:4 Changed 9 years ago by Scott González

Milestone: 1.11.0none

comment:5 Changed 7 years ago by Scott González

#15026 is a duplicate of this ticket.

comment:6 Changed 7 years ago by Scott González

#15087 is a duplicate of this ticket.

comment:7 Changed 7 years ago by Scott González

#6127 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.