Bug Tracker

Modify

Ticket #2267 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 14 months ago

ui.datepicker: minDate maxDate

Reported by: h3r2on Owned by: iMarc
Priority: major Milestone: 1.2.3
Component: ui Version: 1.2.2
Keywords: datepicker, ui Cc:
Blocking: Blocked by:

Description

These functions are misleading. One would expect that a given minDate would allow that minYear to show up in the select for the year by default, as well as the maxYear. However, by only allowing -+10yrs this makes setting birth dates very unintuitive for users as they must select the drop down multiple times if their year is not with in the original set of dates.

So:

$('#restrictDates').attachDatepicker({minDate: new Date(1983, 1,1), 
    maxDate: new Date(2010, 1, 1)});

should give me a year select that has all the years between 1983 and 2010. I think this would greatly enhance the usability of the plugin.

Change History

comment:1 Changed 5 years ago by paul

  • Owner changed from paul to iMarc

comment:2 Changed 5 years ago by kbwood

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

Just set yearRange as well.

$('#restrictDates').attachDatepicker({minDate: new Date(1983, 1,1),

maxDate: new Date(2010, 1, 1), yearRange: '1983:2010'});

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.