You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Date & Time Mathesar type supports the following display options:
Date format
Time format
We will combine this into one format store.
Solution
(1) We should store these display options in the following format in the display_options field of the corresponding column.
{
"format": "YYYY-MM-DD hh:mm A",
}
(2) We should also validate these so that:
Only columns of this type can have these display options. They should not be able to be set if the column is of a different type.
format should be a valid JavaScript date/time format.
We should validate format based on the type of the column. DATE columns should only include date formats, TIME column should only include time formats, TIMESTAMP columns can have either or both.
(3) If the column type is changed, the display options should be deleted.
(4) We should add supported display options to the types endpoint.
Problem
The Date & Time Mathesar type supports the following display options:
We will combine this into one
format
store.Solution
(1) We should store these display options in the following format in the
display_options
field of the corresponding column.(2) We should also validate these so that:
format
should be a valid JavaScript date/time format.DATE
columns should only include date formats,TIME
column should only include time formats,TIMESTAMP
columns can have either or both.(3) If the column type is changed, the display options should be deleted.
(4) We should add supported display options to the
types
endpoint.Additional Context
Column
Django model with support for display options #658The text was updated successfully, but these errors were encountered: