How to change the format of a date type field in a class definition?

Hello,

I have a date field in a class definition.
By default, it is in the format of “YYYY-MM-DD”.
I want to display this as “DD-MM-YYYY”.

How can I change its format on the field as well as on the grid?

I know that I can change the format in grid by using the hook “pimcore.admin.dataobject.get.preSendData”.
Is there any other way for the same?
I mean that if I could change the format on the date field then I don’t need to use the hook. It should be done automatically.

Thanks.

Hello @faiyazalam,

Do you find a solution?

Thank you

No. I could not find the solution.

@fash

Hello Christian,

How are you ?

Is it possible to change the datatype date format in “Data Object”?
If yes, how do it?

Thank you

Alexandre

Hi,
hmm don’t know how this would be possible. If then you have to change the date format directly for the extjs component.

BR
Christian