Skip to main content

Search and Top Navigation

#2061 closed bug (fixed)

Opened December 17, 2007 06:05AM UTC

Closed January 04, 2008 02:11AM UTC

Last modified February 26, 2009 11:21AM UTC

if minDate is set to new Date, today is not selectable

Reported by: wortho Owned by: iMarc
Priority: minor Milestone: 1.5
Component: ui.core Version: 1.2.1
Keywords: datepicker Cc:
Blocked by: Blocking:

The documentation says that minDate should be the minimum date the user can select as a date, however, the behaviour is that all dates including the minDate is greyed out.

Either the documentation needs changing or minDate should be the last ALLOWED date for the user to click on.

In my opinion it should be the latter, because people can then easily use new Date() for today instead of writing a function to calculate yesterday.

Attachments (0)
Change History (5)

Changed December 27, 2007 01:29PM UTC by paul comment:1

owner: → iMarc

Changed January 02, 2008 11:01PM UTC by kbwood comment:2

The minDate value must not have time values in it as this prevents it working correctly. So, for today, use:

var today = new Date();

today = new Date(today.getFullYear(), today.getMonth(), today.getDate());

$('???').datepicker({minDate: today});

I'll see if I can enforce this within the code.

Changed January 04, 2008 02:11AM UTC by kbwood comment:3

resolution: → fixed
status: newclosed

Update code to remove time components of min/max dates before use.

Changed May 24, 2008 03:39AM UTC by comment:4

milestone: 1.2.2

Milestone 1.2.2 deleted

Changed February 26, 2009 11:21AM UTC by paul comment:5

milestone: → 1.5