Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#2832 closed bug (fixed)

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

Reported by: insekticid Owned by: grabanski
Priority: major Milestone: 1.5
Component: ui.datepicker Version: 1.5b4
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 12 years ago.
patch v2.0
datepicker.patch (2.1 KB) - added by insekticid 12 years ago.
patch v2

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by paul

Priority: criticalmajor

comment:2 Changed 12 years ago by paul

Owner: changed from paul to iMarc

comment:3 Changed 12 years ago by insekticid

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

Changed 12 years ago by insekticid

Attachment: datepicker.2.patch added

patch v2.0

Changed 12 years ago by insekticid

Attachment: datepicker.patch added

patch v2

comment:4 Changed 12 years ago by insekticid

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');

};

comment:5 Changed 12 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:6 Changed 12 years ago by paul

Component: ui.coreui.datepicker
Version: 1.2.31.5b4

comment:7 Changed 12 years ago by paul

Owner: changed from iMarc to grabanski
Status: newassigned

comment:8 Changed 12 years ago by grabanski

Those three methods you have added are features. I will move them to a feature ticket.

comment:9 Changed 12 years ago by grabanski

I fixed this ticket, but I cannot close it. Permissions?

comment:10 Changed 12 years ago by Scott González

Resolution: fixed
Status: assignedclosed

comment:11 Changed 11 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.