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

[pickers] Reference Date does not set the right day #12058

Closed
3pleFly opened this issue Feb 14, 2024 · 4 comments
Closed

[pickers] Reference Date does not set the right day #12058

3pleFly opened this issue Feb 14, 2024 · 4 comments
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module!

Comments

@3pleFly
Copy link

3pleFly commented Feb 14, 2024

Steps to reproduce

Link to live example: https://stackblitz.com/edit/react-sgimxs-pcufiq?file=Demo.tsx

Steps:

  1. Add a reference date, without setting a value.
  2. Date picker uses the correct year and month, but the day is set to the last day of the month.

Current behavior

Date picker uses the correct year and month, but the day is set to the last day of the month.

Expected behavior

When reference date is set, then date picker opens on the exact date provided.

Context

This is required in a use case where the value of a date picker is empty (Null). And you need the date picker component to open on a specific day. Currently it prompts the correct month and year, but the day is needed too.

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: referenceDate

@3pleFly 3pleFly added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 14, 2024
@zannager zannager added the component: pickers This is the name of the generic UI component, not the React module! label Feb 14, 2024
@LukasTy
Copy link
Member

LukasTy commented Feb 15, 2024

@3pleFly I can confirm the problem exists and only on the v6 release, it seems fixed in the v7 pre-release.
We'll look into fixing the behavior on v6. 😉

@LukasTy LukasTy changed the title Reference Date does not set the right day [pickers] Reference Date does not set the right day Feb 15, 2024
@LukasTy LukasTy added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 15, 2024
@3pleFly
Copy link
Author

3pleFly commented Feb 18, 2024

@3pleFly I can confirm the problem exists and only on the v6 release, it seems fixed in the v7 pre-release. We'll look into fixing the behavior on v6. 😉

yahoo! I may update to v7 in the future, for now i'll live with it.. Looking forward :)

@LukasTy
Copy link
Member

LukasTy commented Feb 20, 2024

Fixed by #12136.

@LukasTy LukasTy closed this as completed Feb 20, 2024
Copy link

⚠️ This issue has been closed.
If you have a similar problem, please open a new issue and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.

How did we do @3pleFly?
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our brief survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants