I would like to change the format of the DateTime field to YYYYMMMMDMHmm. So I want to add a custom widget, can you tell me how to work on it?
To pytanie dostało ostrzeżenie
2
Odpowiedzi
4940
Widoki
Hi,
Instead of creating new widget can you try the following way.
Go to Settings-> Translations-> Languages Choose your preferred language and Edit the Date format and Time Format to your required one and Save.
Regards
Go to -> Settings -> Translation -> Languages
Open your activated languages
Change the date format
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się
It is in the form of YYYY/MMM/D/h/m.
Field Information
date = fields.Datetime()
<field name="date"/>