Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#5216 closed bug (notabug)

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:

Description

I used the following code: $('.selector').datepicker(); $('.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.

Change History (3)

comment:1 Changed 9 years ago by kbwood

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

comment:2 Changed 7 years ago by Jörn Zaefferer

Resolution: invalid
Status: newclosed

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

comment:3 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.