[data grid] Add native data grid `time` column type
Duplicates
- [X] I have searched the existing issues
Latest version
- [X] I have tested the latest version
Summary 💡
We should be able to use time as a native column type.
The filters can stay the same, the only difference would be to only use a time picker instead of the date time picker used for dateTime.
I'd be happy to work on it if you would point me to where the modifications should be made.
Examples 🌈
No response
Motivation 🔦
date and dateTime are already available as native column types, it's been amazing to be able to use them in my projects.
Since I use a display a lot of time variables in my projects, this would save a lot of custom code.
Order ID 💳 (optional)
No response
To add a new column type, you can have a look at this folder in which all the default types are defined
https://github.com/mui/mui-x/tree/master/packages/grid/x-data-grid/src/colDef
The first step could be to create a column definition based on type: 'dateTime' and spread it into the column definition
https://mui.com/x/react-data-grid/column-definition/#custom-column-types
@alexfauquette Thanks, I think I did all that in the PR I made for this issue, but the scope of this repo is so big, I'm kinda out of my depths here.
I'm not sure I made every modification needed for this new column type.
Sorry, I did not see you already opened a PR 🙈
Hello, any update about the time column type?
I think it got forgotten #5422 mostly because it's not sure what kind of interface to use to edit time cells
But from that time we got the <TimeField/> component (see here) which could be more apropriate
Thank you for your response, the feature that i looking for is a time filter at the DataDridPro columns like the date type filter.
I'd love to see this implemented. I've spent much of the afternoon trying to cobble together an editable time-only column in a React MUI Data Grid with no luck.
Being able to set "time" as the type for the column instead of just "datetime" would be amazing.