[pickers] DateField behavior is impacted by the year format #12535
Labels
bug 🐛
Something doesn't work
component: pickers
This is the name of the generic UI component, not the React module!
Search keywords
DateField time
Latest version
Steps to reproduce
Link to live example: https://codesandbox.io/p/sandbox/gallant-liskov-9xc4h3?file=%2Fsrc%2FApp.js%3A21%2C8-21%2C17
Steps:
<DateField>
Notes:
dayjs.extend(timezone);
seems to be a required condition to reproduce the issue.Current behavior
When the DateField is set to use a 4-digit year format the actual value of the input has a time component. This does not occur when using a 2-digit year format.
Expected behavior
In the example above (in UTC-7) both values should display as
2005-05-05T07:00:00.000Z
Context
No response
Your environment
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: