[Catalyst] Changing format of date field

Adam Witney awitney at sgul.ac.uk
Wed Jan 8 17:56:25 GMT 2014



On 8. 1. 2014 17:31, Hartmaier Alexander wrote:
> On 2014-01-08 18:19, Adam Witney wrote:
>>
>>
>> On 7. 1. 2014 9:55, neil.lunn wrote:
>>
>>> 3. You *Are* going to get back a string in the raw params. So what you
>>> need to do is parse that format into a DateTime object again when
>>> submitting back to model or wherever else you want to use it as an
>>> object.
>>
>> Thanks guys for the various suggestions, I think I will follow this
>> approach above and leave the format to the view as suggested!
>>
>> Thanks again
>>
>> Adam
> I have various format_ methods in my view class that are exposed to TT
> using View::TT's expose_methods config option including format_date,
> format_datetime and format_datetime_ajax.

Thanks Alexander, could you possibly send me an example of the 
format_datetime? I am trying to figure exactly where and how to put it in.

Thanks

Adam



More information about the Catalyst mailing list