Skip to main content

Search and Top Navigation

#8873 open bug ()

Opened November 30, 2012 11:19AM UTC

Last modified October 23, 2016 12:02PM UTC

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.

Attachments (0)
Change History (7)

Changed November 30, 2012 01:48PM UTC by tj.vantoll comment:1

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/.

Changed December 11, 2012 04:09AM UTC by tj.vantoll comment:2

#8899 is a duplicate of this ticket.

Changed December 11, 2012 04:11AM UTC by tj.vantoll comment:3

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.

Changed June 24, 2014 11:49PM UTC by scottgonzalez comment:4

milestone: 1.11.0none

Changed August 05, 2016 09:10PM UTC by scottgonzalez comment:5

#15026 is a duplicate of this ticket.

Changed October 23, 2016 11:52AM UTC by scottgonzalez comment:6

#15087 is a duplicate of this ticket.

Changed October 23, 2016 12:02PM UTC by scottgonzalez comment:7

#6127 is a duplicate of this ticket.