Closed Skarvion closed 1 month ago
@Skarvion <DatePickerElement>
uses the validateDate
function internally to perform date-related validation. MUI, in this commit, has changed the import path for validateDate
from @mui/x-date-pickers/internals
to @mui/x-date-pickers/validation
.
@dohomi, this change will not be backward compatible if we implement it.
Ok thanks for pointing this out.
Hi! Any workaround?
Hi! Any workaround?
npm install @mui/x-date-pickers@7.16.0
Duplicates
Latest version
Current behavior 😯
In a NextJS project, when using the latest
@mui/x-date-pickers
package v 7.17 and then build, the following warning message is raisedAttempted import error: 'validateDate' is not exported from '@mui/x-date-pickers/internals'
Honestly, I don't know what the actual impact when testing it, but the warning message is a bit concerning whereas last week it wasn't there.
See https://github.com/mui/mui-x/pull/14486 that moves the
validateDate
export from@mui/x-date-pickers/internals
to@mui/x-date-pickers/validation
I suppose an easy fix is to use the new import path, but since that PR introduces a new validation hook, I'll leave it up to your discretion how to fix import issue.
For now, to avoid the error, I can use older version of
@mui/x-date-pickers
Expected behavior 🤔
-
Steps to reproduce 🕹
Steps:
@mui/x-date-pickers@7.17.0
<DatePickerElement>