Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data grid] Add native data grid time column type #5421

Open
2 tasks done
Zenoo opened this issue Jul 7, 2022 · 7 comments 路 May be fixed by #5422
Open
2 tasks done

[data grid] Add native data grid time column type #5421

Zenoo opened this issue Jul 7, 2022 · 7 comments 路 May be fixed by #5422
Labels
component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request waiting for 馃憤 Waiting for upvotes

Comments

@Zenoo
Copy link
Contributor

Zenoo commented Jul 7, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • 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

@Zenoo Zenoo added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 7, 2022
@Zenoo Zenoo changed the title Add native data grid native time column type Add native data grid time column type Jul 7, 2022
@Zenoo Zenoo linked a pull request Jul 7, 2022 that will close this issue
@cherniavskii cherniavskii added component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request waiting for 馃憤 Waiting for upvotes and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 8, 2022
@alexfauquette
Copy link
Member

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

@Zenoo
Copy link
Contributor Author

Zenoo commented Jul 8, 2022

@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.

@alexfauquette
Copy link
Member

Sorry, I did not see you already opened a PR 馃檲

@m4theushw m4theushw changed the title Add native data grid time column type [data grid] Add native data grid time column type Jul 11, 2022
@ETzaf
Copy link

ETzaf commented Sep 15, 2023

Hello, any update about the time column type?

@alexfauquette
Copy link
Member

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

@ETzaf
Copy link

ETzaf commented Sep 19, 2023

Thank you for your response, the feature that i looking for is a time filter at the DataDridPro columns like the date type filter.

@neilenns
Copy link

neilenns commented Feb 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request waiting for 馃憤 Waiting for upvotes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants