[TYPO3-english] BE datetime field preset time

Jan Bednarik info at bednarik.org
Thu Dec 19 21:12:48 CET 2013


Hi,

thanks, I didn't think of that.

This works:

'default' => time()-(time()%3600),

It sets default to current day and hour with 00 minutes.

Thanks

Jan

Dne 18.12.2013 10:08, Jigal van Hemert napsal(a):
> Hi,
>
> On 17-12-2013 20:50, Jan Bednarik wrote:
>> is it possible to preset time in the datetime picker? Editors don't like
>> that the current time is displayed there, because they in most cases
>> need to input 00 into minutes field and so they would like to have 00
>> there as default.
>>
>> (It's 4.5).
>
> TCA is a PHP array, so you can set any default value you want for a
> date(time) field. If you build an expression which is the current time
> with minutes set to zero then the minutes are zero by default.
> I'm not sure what the behaviour of the ExtJs datepicker is when you pick
> another day, but I suspect that it won't change the time in such a case.
>



More information about the TYPO3-english mailing list