Commit c0fdf7e3 authored by metzlerd's avatar metzlerd
Browse files

Changed date format to default.

parent 706faf81
......@@ -571,10 +571,10 @@ class FrxReport {
case 'date_popup':
case 'date_select':
if ($value){
$date_format = @$options['date_format'] ? $options['date_format'] : 'Y-m-d';
$datetime = @strtotime($value);
if ($datetime) {
$value = date($options['date_format'], $datetime);
$value = date($date_format, $datetime);
}
}
......
......@@ -555,17 +555,16 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
case 'date_text':
case 'date_select':
case 'date_popup':
if (@$options['date_format']) {
$ctl_attrs['#date_format'] = $options['date_format'];
if ($value){
$datetime = @strtotime($value);
if ($datetime) {
$value = date($options['date_format'], $datetime);
}
$options['date_format'] = @$options['date_format'] ? $options['date_format'] : 'Y-m-d';
$ctl_attrs['#date_format'] = $options['date_format'];
if ($value){
$datetime = @strtotime($value);
if ($datetime) {
$value = date($options['date_format'], $datetime);
}
}
if (@$options['date_year_range']) {
$ctl_attrs['#date_year_range'] = $options['date_year_range'];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment