[TYPO3-project-formidable] renderlet:DATE

Christian Tauscher cms at media-distillery.de
Wed Apr 16 18:40:36 CEST 2008


Hello dear Developers!

Yes - this is my forst real try on fomidable.
I want to validate the given Date (the user must be older than 16). So I 
tried this:


<renderlet:DATE name="birthdate" label="Geburtsdatum">
<data>
<datetime format="%d.%m.%Y" allowManualEdition="true" />
<defaultvalue>
	<userobj>
	<php>
	<![CDATA[return (mktime());]]>
	</php>
	</userobj>
</defaultvalue>
</data>
			
<validators>
<validator:NUM>
<ishigher>
	<userobj>
	<php>
	<![CDATA[return (mktime()-(16*365*24*60*60));]]>
	</php>
	</userobj>
	<message>You must be a least 16 Years old!</message>			</ishigher>

</renderlet:DATE>


But I faild....
debugung the Date-Selector output I get this:

Selected : 16.04.2008
Unix Time: 1208363624 (expected)
PostVar  : 1208296800 (ok, few secounds between....)

So far so good, but but

Selected : 16.04.2000
Unix Time: 1208363624 (expected)
PostVar  :  955843200

What the heck is this?

iam sure I missed something in the docs.
Maybe you counld give me a hint to the right direction in this Timestamp 
an Validation issue.

Thenaks a lot,

Christian.



More information about the TYPO3-project-formidable mailing list