#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 13 years ago by
comment:2 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
kbwood couldn't reproduce 2 years ago, I can't either.
Can you post your code that fills in the fields on the postback? Is this when the values get copied to all input boxes?