[TYPO3-mvc] Extbase Property Mapper doesn't handle DateTime yet
Xavier Perseguers
typo3 at perseguers.ch
Wed Nov 18 06:46:25 CET 2009
Hi Jochen,
>> or am i on the wrong way and there is a much easier solution for
>> dateTime objects set via fluid form data?
>
> You are right. That's because the property mapper was taken from FLOW3.
> And in FLOW3 there will be a more general concept of property editing
> available in the future (AFAIK). But it can also be a bug.
>
> I have implemented a simple string to DateTime mapping in Extbase now.
> It should also work, if you have your own DateTime class extending the
> one from PHP.
Sounds like you're talking from what I did ;-) I remember having had problems with my own subclass of DateTime.
> The string entered in the form field is directly passed to the DateTime
> constructor. Thus, all of the following strings should work:
>
> 2.10.2009
> 2009-11-17
> now +1 week
> today
> next Monday
Thanks for this enhancement.
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-project-typo3v4mvc
mailing list