[Typo3-dev] TCEForms, type="input", eval="date"
Kraft Bernhard
kraftb at gmx.net
Mon Mar 14 12:46:03 CET 2005
Hallo list,
One of our customers reported a problem with a date field. The date field has a checkbox left of
it and the problem is when the customer checks the checkbox so he can enter a date the automatically
inserted date is alway one day after the actual one.
I located the error in classs.t3lib_tceforms.php near line 920 in function "getSingleField_typeInput":
------------------------------<snip>-----------------------------------
$nextMidNight = mktime(0,0,0)+1*3600*24;
$checkSetValue = in_array('date',$evalList) ? $nextMidNight : '';
$checkSetValue = in_array('datetime',$evalList) ? time() : $checkSetValue;
------------------------------</snip>-----------------------------------
As you can see checkSetValue gets set to nextMidNight if the input field is of type "date".
The problem is $nextMidNight gets set to the midnight of the actual day + 1 day. So to the
midnight of the following day. This results in the date-field always displaying the next day
if it got checked.
Is this desired behavour. I think it would be more user friendly to fill in the date of the
actual day ?
greets,
Bernhard
--
Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50
More information about the TYPO3-dev
mailing list