Skip to main content

Bug Tracker

Side navigation

#2832 closed bug (fixed)

Opened May 09, 2008 10:28AM UTC

Closed June 06, 2008 01:00AM UTC

Last modified March 14, 2012 09:33PM UTC

Datepicker v3.4.3 $(element).datepicker('getDate') doesn't work properly

Reported by: insekticid Owned by: iMarc
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: datepicker Cc:
Blocked by: Blocking:
Description

When I enter any date into datepicker input and then I want to get this date with function $(element).datepicker('getDate') I always get "null".

I studied the code and I found this: date from input is parsed only when I opened datepicker!

So now I am using this ugly hack

$(element).datepicker("show");

$(element).datepicker("hide");

parsed = $(element).datepicker('getDate');

Attachments (2)
  • datepicker.2.patch (2.1 KB) - added by insekticid May 09, 2008 02:27PM UTC.

    patch v2.0

  • datepicker.patch (2.1 KB) - added by insekticid May 09, 2008 02:27PM UTC.

    patch v2

Change History (7)

Changed May 09, 2008 11:37AM UTC by paul comment:1

priority: criticalmajor

Changed May 09, 2008 11:44AM UTC by paul comment:2

owner: pauliMarc

Changed May 09, 2008 12:16PM UTC by insekticid comment:3

Hello, here is my hotfix + I added new method for checking, if entered date is in allowed range

Changed May 09, 2008 02:32PM UTC by insekticid comment:4

new methods: isMaxDate, isMinDate

patch v2.0 is the same like patch v2

now It is possible to validate Datepicker dates with validate plugin

$.validator.methods.dateMin = function (value, element, param)

{

return $(element).datepicker('isMinDate');

};

$.validator.methods.dateMax = function (value, element, param)

{

return $(element).datepicker('isMaxDate');

};

$.validator.methods.dateRange = function (value, element, param)

{

return $(element).datepicker('isDateInRange');

};

Changed June 05, 2008 02:49PM UTC by insekticid comment:5

new version of my patch (new enhancement request)

http://dev.jquery.com/ticket/2991

Changed June 05, 2008 02:50PM UTC by insekticid comment:6

so you can close this bug

it has been fixed in revision 125 ;-) thx

Changed June 06, 2008 01:00AM UTC by flesler comment:7

resolution: → fixed
status: newclosed