You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
There should be an option to set the dateFormat for the date method.
You should be able to do something like:
$form->addDate("Date:", "date", "", array("dateFormat" => 'dd/mm/yy'));
Here is my patch to add this feature:
line 1532:
$jqueryDateIDArr[] = $ele->attributes["id"];
$jqueryDateFormat[] = $ele->attributes["dateFormat"];
line 2031:
if(!empty($jqueryDateIDArr)) {
$dateSize = sizeof($jqueryDateIDArr);
for($d = 0; $d < $dateSize; ++$d) {
if( $jqueryDateFormat[$d] != '' ) {
$str .= "\n\t\t\t" . '$("#' . $jqueryDateIDArr[$d]
. '").datepicker({ dateFormat: "'. $jqueryDateFormat[$d] .'",
showButtonPanel: true });';
} else {
$str .= "\n\t\t\t" . '$("#' . $jqueryDateIDArr[$d]
. '").datepicker({ dateFormat: "MM d, yy" , showButtonPanel: true });';
}
}
}
Original issue reported on code.google.com by moncojhr@gmail.com on 3 Mar 2010 at 3:36
The text was updated successfully, but these errors were encountered:
I added jqueryDateFormat as a form attribute that can be used to control the
formatting
of the dates returned by both the date and daterange fields. Because this is a
form
attribute and not a field attribute, it is specified in the form's
setAttributes method and
not when adding each individual date/daterange field with the
addDate/addDateRange
method.
A complete reference of available options for the jqueryDateFormat attribute
can be
found at http://docs.jquery.com/UI/Datepicker/$.datepicker.formatDate.
Original comment by ajporterfield@gmail.com on 3 Mar 2010 at 5:11
Original issue reported on code.google.com by
moncojhr@gmail.com
on 3 Mar 2010 at 3:36The text was updated successfully, but these errors were encountered: