Hi All,
I'm having some trouble with input_date_tag - I can't get it to
display dates in UK format (DD-MM-YYYY).
In my template, I have :
<?php echo input_date_tag('startdate', $startdate, array('rich' =>
true, 'calendar_options' => 'ifFormat: "%Y-%m-%d", daFormat: "%d-%m-
%Y", firstDay: 1, range: Array(2007,'.(date('Y')+3).')')); ?>
Where start date has come directly from the database, so it's YYYY-MM-
DD format. As this is the default, I probably don't even need to
specify ifFormat...
Anyway, the output in my page looks like this :
<input type="text" name="startdate" id="startdate" value="2007-01-01"
size="12" /><button type="button" disabled="disabled" onclick="return
false" id="trigger_startdate">...</button><script type="text/
javascript">
document.getElementById("trigger_startdate").disabled = false;
Calendar.setup({
inputField : "startdate",
ifFormat : "%Y-%m-%d",
daFormat : "%Y-%m-%d",
button : "trigger_startdate",
ifFormat: "%Y-%m-%d", daFormat: "%d-%m-%Y", firstDay: 1, range:
Array(2007,2011)
});
For some reason it appears to be repeating the ifFormat and daFormat
params (and ignoring the second time they are defined).
Whatever I do, the initially displayed date is always in YYYY-MM-DD
format. However, once I've selected a date in the widget it displays
it in the correct format.
Any ideas???
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---