Opened 13 years ago
Closed 11 years ago
#5121 closed bug (worksforme)
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: |
Description
This works correct:
$("#startDateDiv").datepicker({altField: '#startDate',
altFormat: 'yy-mm-dd', dateFormat: 'yy-mm-dd'});
$('#startDateDiv').datepicker('option', 'defaultDate','<?php echo $_GETstartDate?; ?>' );
And this not works correctly:
$("#endDateDiv").datepicker({altField: '#endDate',
altFormat: 'yy-mm-dd', dateFormat: 'yy-mm-dd', defaultDate: '<?php echo $_GETendDate?; ?>'});
Change History (5)
comment:1 Changed 13 years ago by
Component: | ui.core → ui.datepicker |
---|
comment:2 Changed 13 years ago by
Milestone: | TBD → 1.8 |
---|
comment:3 Changed 13 years ago by
comment:4 Changed 12 years ago by
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
comment:5 Changed 11 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Works: http://jsbin.com/okukox/edit#javascript,html
Probably got fixed since this issue was reported.
What is not working? Are the calendars not showing? Are the alternate fields not populated?