Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4319 มุมมอง

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?

อวตาร
ละทิ้ง
ผู้เขียน

It is in the form of YYYY/MMM/D/h/m.

Field Information
date = fields.Datetime()
<field name="date"/>

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง