Support data grid column type date formats #2581
Labels
feature: Components
Button, input, table, etc.
new feature
New feature or request
waiting for 👍
Waiting for upvotes
Summary 💡
Today, developers can set their column type to date:
However, have no options to decide what formatting it should use exactly. It's using the default MUI X column type formatting https://mui.com/x/react-data-grid/column-definition/#column-types, so effectively
value.toLocaleDateString()
.It would be great to be able to choose from more options, a bit like numbers
Examples 🌈
Motivation 🔦
Less code to write. For now, I will stick to using dayjs: https://github.com/mui/mui-private/blob/c5f0a6288cbbd052cee7f141d2f117bc186ece6a/tools-private/toolpad/resources/invoice.ts#L77
It's a continuation of #2371.
The text was updated successfully, but these errors were encountered: