Skip to main content

Search and Top Navigation

#4357 closed bug (fixed)

Opened March 17, 2009 09:29PM UTC

Closed April 02, 2009 12:50AM UTC

minDate getter acting as setter

Reported by: caesar2k Owned by:
Priority: minor Milestone: 1.8
Component: ui.datepicker Version: 1.7
Keywords: datepicker setter minDate Cc:
Blocked by: Blocking:
Description

The minDate getter ($(".selector").datepicker("option", "minDate")) is acting like a setter.

To reproduce this, I was working comparing two dates with:

(note that $begin and $end are both "$().datepicker" variables)

if (Date.parse($begin.datepicker("getDate")) > $end.datepicker("option","minDate")){

// do stuff

}

Using Date.parse to transform the date to a integer, so they can be compared.

After that comparision, the "$begin" minDate is cleared, like if it was set to 0 for example. I'm trying to make a start day/end day range, but without that functionality, I can't limit or update the datepicker on-the-fly

Attachments (0)
Change History (3)

Changed March 18, 2009 07:05PM UTC by caesar2k comment:1

Actually the code is:

if (Date.parse($begin.datepicker("getDate")) > Date.parse($end.datepicker("option","minDate"))){ // do stuff }

and the "$end" variable minDate that gets cleared, not the "$begin".

Changed March 19, 2009 07:52PM UTC by Cloudream comment:2

milestone: 1.7.11.8
priority: majorminor

Changed April 02, 2009 12:50AM UTC by kbwood comment:3

resolution: → fixed
status: newclosed

The retrieve part of the option command wasn't implemented.

Fixed in r2418 for #4301.