diff --git a/etemplate/inc/class.date_widget.inc.php b/etemplate/inc/class.date_widget.inc.php index 7f97dede6f..9f6cccbbcc 100644 --- a/etemplate/inc/class.date_widget.inc.php +++ b/etemplate/inc/class.date_widget.inc.php @@ -120,6 +120,17 @@ $date = split('[- /.:,]',$value); //echo "date=
"; print_r($date); echo "
"; $mdy = split('[- /.:,]',$data_format); + + if (count($mdy) == 1) // no seperators, eg. YmdHi + { + for($n = $i = 0; $n < strlen($data_format); ++$n) + { + $mdy[$n] = $data_format{$n}; + $len = $data_format{$n} == 'Y' ? 4 : 2; + $date[$n] = substr($value,$i,$len); + $i += $len; + } + } $value = array(); foreach ($date as $n => $dat) {