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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date-fns V3 and material-table 6.4.1 throws parseISO error when a column has a type of "date"/"datetime" #838

Closed
ShotSkydiver opened this issue Apr 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ShotSkydiver
Copy link

ShotSkydiver commented Apr 16, 2024

Guidelines

When I updated material-table to the latest 6.4.1, and updated date-fns to its latest version, 3.6.0, my React app crashes when a table column has the type of "date" or "datetime", with this error:
(0, _parseISO["default"]) is not a function. (In '(0, _parseISO["default"])(props.value)', '(0, _parseISO["default"])' is an instance of Object)

OS: macOS
Browser: Safari
Version: 17.5

@ShotSkydiver ShotSkydiver added the bug Something isn't working label Apr 16, 2024
@Domino987
Copy link
Contributor

Hi, can you add a sandbox with your minimal reproducible example?
Ty

@TheWeirdDev
Copy link
Contributor

I have the same issue. According to the date-fns documentation this line should be changed from:

import parseISO from 'date-fns/parseISO';

to

import { parseISO } from 'date-fns';

@Domino987
Copy link
Contributor

Would you mind creating a PR for this?

@TheWeirdDev
Copy link
Contributor

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants