Skip to main content

Search and Top Navigation

#5121 closed bug (worksforme)

Opened February 02, 2010 04:52PM UTC

Closed February 27, 2012 02:16PM UTC

DatePicker dateFormat and defaultDate

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

This works correct:

$("#startDateDiv").datepicker({altField: '#startDate',

altFormat: 'yy-mm-dd',

dateFormat: 'yy-mm-dd'});

$('#startDateDiv').datepicker('option', 'defaultDate','<?php echo $_GET['startDate']; ?>' );

And this not works correctly:

$("#endDateDiv").datepicker({altField: '#endDate',

altFormat: 'yy-mm-dd',

dateFormat: 'yy-mm-dd',

defaultDate: '<?php echo $_GET['endDate']; ?>'});

Attachments (0)
Change History (5)

Changed February 17, 2010 12:04PM UTC by jzaefferer comment:1

component: ui.coreui.datepicker

Changed February 18, 2010 03:45PM UTC by scottgonzalez comment:2

milestone: TBD1.8

Changed February 22, 2010 05:19AM UTC by kbwood comment:3

What is not working? Are the calendars not showing? Are the alternate fields not populated?

Changed August 25, 2011 10:48AM UTC by ghallas comment:4

I have the same thing. What is not working, is that the dateFormat is not applied to the defaultDate when you set all the parameters in the $(selector).datepicker() call.

if you set the dateFormat, and then use

$('#startDateDiv').datepicker('option', 'defaultDate','someDate' ),

the dateFormat is applied to the defaultDate.

I hope I helped clear this out

Changed February 27, 2012 02:16PM UTC by jzaefferer comment:5

resolution: → worksforme
status: newclosed


Probably got fixed since this issue was reported.