Quantcast

DateTime and the Escape view helper

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

DateTime and the Escape view helper

Walter Tamboer
Currently there is a bug where the escape view helper tries to escape a DateTime value which of course can't be converted to a string.
 
This bug occurs when one has a form with an object bound to it in combination with a hydrator. When a DateTime value is extracted from the object, the DateTime value is populated into the form (as expected). When the form is rendered, the escape view helper tries to escape the DateTime value which of course failes.
 
How can we solve this? The problem is that you don't know which format the date and time should be shown in. For example: I can have a dutch locale while having a form field that has an american date format in it.
 
Regards,
 
Walter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: DateTime and the Escape view helper

DeNix
04.07.2012 13:30, Walter Tamboer пишет:
Currently there is a bug where the escape view helper tries to escape a DateTime value which of course can't be converted to a string.
 
This bug occurs when one has a form with an object bound to it in combination with a hydrator. When a DateTime value is extracted from the object, the DateTime value is populated into the form (as expected). When the form is rendered, the escape view helper tries to escape the DateTime value which of course failes.
 
How can we solve this? The problem is that you don't know which format the date and time should be shown in. For example: I can have a dutch locale while having a form field that has an american date format in it.

I think I18n\View\Helper\DateFormat can help with that

Denis

Loading...