Skip to main content

Search and Top Navigation

#9207 closed bug (invalid)

Opened April 04, 2013 02:17PM UTC

Closed April 19, 2013 08:34AM UTC

Issue with DatePicker

Reported by: ovrijburg Owned by: ovrijburg
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

When adding this

$( "#startdate" ).datepicker();
$( "#startdate" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
$( "#startdate" ).datepicker.parseDate( "yy-mm-dd", $row_MailingList['startdate'] );

to the function it will show a blank field but once the date is selected it returns the correct date format YYYY-MM-DD, however when I change the order to

$( "#startdate" ).datepicker();
$( "#startdate" ).datepicker.parseDate( "yy-mm-dd", $row_MailingList['startdate'] );
$( "#startdate" ).datepicker( "option", "dateFormat", "yy-mm-dd" );

it shows the date in the field but once you select a new date it returns the date in the format "MM/DD/YYYY" which is not what I want. I need the date to appear in the field and when a new date is selected the field should be updated with the date in the correct format YYYY-MM-DD

Attachments (0)
Change History (4)

Changed April 04, 2013 04:24PM UTC by tj.vantoll comment:1

owner: → ovrijburg
status: newpending

Hi ovrijburg,

Thanks for taking the time to contribute to the jQuery UI project. In order to assess this ticket we need a reduced test case that this issue. You can use this as a starting point: http://jsfiddle.net/tj_vantoll/tRdpr/.

Changed April 04, 2013 05:10PM UTC by scottgonzalez comment:2

description: When adding this \ \ $( "#startdate" ).datepicker(); \ $( "#startdate" ).datepicker( "option", "dateFormat", "yy-mm-dd" ); \ $( "#startdate" ).datepicker.parseDate( "yy-mm-dd", $row_MailingList['startdate'] ); \ \ to the function it will show a blank field but once the date is selected it returns the correct date format YYYY-MM-DD, however when I change the order to \ \ $( "#startdate" ).datepicker(); \ $( "#startdate" ).datepicker.parseDate( "yy-mm-dd", $row_MailingList['startdate'] ); \ $( "#startdate" ).datepicker( "option", "dateFormat", "yy-mm-dd" ); \ \ it shows the date in the field but once you select a new date it returns the date in the format "MM/DD/YYYY" which is not what I want. I need the date to appear in the field and when a new date is selected the field should be updated with the date in the correct format YYYY-MM-DD \ When adding this \ \ {{{ \ $( "#startdate" ).datepicker(); \ $( "#startdate" ).datepicker( "option", "dateFormat", "yy-mm-dd" ); \ $( "#startdate" ).datepicker.parseDate( "yy-mm-dd", $row_MailingList['startdate'] ); \ }}} \ \ to the function it will show a blank field but once the date is selected it returns the correct date format YYYY-MM-DD, however when I change the order to \ \ {{{ \ $( "#startdate" ).datepicker(); \ $( "#startdate" ).datepicker.parseDate( "yy-mm-dd", $row_MailingList['startdate'] ); \ $( "#startdate" ).datepicker( "option", "dateFormat", "yy-mm-dd" ); \ }}} \ \ it shows the date in the field but once you select a new date it returns the date in the format "MM/DD/YYYY" which is not what I want. I need the date to appear in the field and when a new date is selected the field should be updated with the date in the correct format YYYY-MM-DD \

Changed April 04, 2013 05:11PM UTC by scottgonzalez comment:3

component: ui.coreui.datepicker

Changed April 19, 2013 08:34AM UTC by trac-o-bot comment:4

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!