Skip to main content

Search and Top Navigation

#5216 closed bug (notabug)

Opened February 22, 2010 06:44PM UTC

Closed February 27, 2012 03:02PM UTC

Last modified October 11, 2012 09:15PM UTC

Setting dateFormat option after loading problem

Reported by: Elrinth Owned by:
Priority: minor Milestone:
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

I used the following code:


$('.selector').datepicker('option', 'dateFormat', 'yy-mm-dd 00:00:00');

I have to input fields. StartDate, EndDate. They are filled in on a postback when I've selected a choice in a listbox.

jquery ui.datepicker then does something naughty.

It takes the value in the first input box and fills in all other input boxes.

Initializing like this solved it for me:

$(".selector").datepicker({ dateFormat: "yy-mm-dd 00:00:00" });

Another thing I'd like from this plugin is the ability to allow yy-mm-dd 00:00:00 to be written but the one choosen from the calendar picker is always yy-mm-dd.

With dateFormat set as "yy-mm-dd", I'm not allowed to type in space or :. Perhaps something you can think of for the future.

Attachments (0)
Change History (3)

Changed February 23, 2010 02:27AM UTC by kbwood comment:1

Can you post your code that fills in the fields on the postback? Is this when the values get copied to all input boxes?

Changed February 27, 2012 03:02PM UTC by jzaefferer comment:2

resolution: → invalid
status: newclosed

kbwood couldn't reproduce 2 years ago, I can't either.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted