[Typo3-dev] TCEForms, type="input", eval="date"

Kasper Skårhøj kasper2005 at typo3.com
Tue Mar 22 17:19:47 CET 2005


It was made like that on purpose.


You can provide a patch suggestion for the core CVS where it can be
changed by TSconfig and I will be willing to look at it.

- kasper



On Mon, 2005-03-14 at 12:46, Kraft Bernhard wrote:
> 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
-- 
- kasper

*******************
Happy new year! - My email address is now: 

		kasper2005 at typo3.com 







More information about the TYPO3-dev mailing list