Ticket #3859 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

DatePicker can't pick years before 1999

Reported by: Trustmaster Owned by:
Priority: major Milestone: 1.7
Component: ui.datepicker Version: 1.6rc5
Keywords: Cc:
Blocking: Blocked by:

Description

Hi, I'd like to use Datepicker for user birth dates, but it can't select dates before 1999. I use code like this:

$("#datepicker").datepicker({
		changeMonth: true,
		changeYear: true,
		dateFormat: 'dd-mm-yy',
		minDate: '-100Y',
		maxDate: '0',
	});

Tried other minDate variants too, it didn't help. Tested on 1.5.3 and 1.6.rc5

Change History

comment:1 Changed 5 years ago by kbwood

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r1670. The yearRange setting controls which years are shown in the year drop-down, with minDate and maxDate having the final say. yearRange can be either a relative value ('-10:+10') or an absolute value ('1990:2010'). The relative value was calculated from today's date (hence the limit of 1999). This has been changed back to relative to the currently selected date, meaning that the available years always surround that date.

Note: See TracTickets for help on using tickets.