Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4262 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Tác giả

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

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Go to -> Settings -> Translation -> Languages



Open your activated languages

Change the date format

Ảnh đại diện
Huỷ bỏ