Ticket #4357 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

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:
Blocking: Blocked by:

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

Change History

comment:1 Changed 6 years ago by caesar2k

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

comment:2 Changed 6 years ago by Cloudream

  • Priority changed from major to minor
  • Milestone changed from 1.7.1 to 1.8

comment:3 Changed 5 years ago by kbwood

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

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

Fixed in r2418 for #4301.

Note: See TracTickets for help on using tickets.