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

[ic-date-input/picker] Updating dateFormat clears value #2056

Open
GCHQ-Developer-530 opened this issue Jun 25, 2024 · 1 comment
Open

[ic-date-input/picker] Updating dateFormat clears value #2056

GCHQ-Developer-530 opened this issue Jun 25, 2024 · 1 comment
Labels
type: bug 🐛 Something isn't working

Comments

@GCHQ-Developer-530
Copy link
Contributor

Summary of the bug

When using the storybook playground, updating the dateFormat clears whatever is currently in the value field. Instead it should just re-arrange the value to fit the new date format

e.g. if someone enters a date in DD/MM/YYYY like 25/06/2024, then the dateFormat changes to YYYY/MM/DD then the value shown in the date input/date picker should be 2024/06/25

🪜 How to reproduce

Tell us the steps to reproduce the problem:

  1. Go to date picker storybook playground
  2. Set value
  3. Update dateFormat
  4. See the error

🧐 Expected behaviour

As mentioned above, the value should be updated to follow the date format.

@ad9242
Copy link
Contributor

ad9242 commented Jun 25, 2024

Will need to add a watch on the dateFormat, but even doing this does not seem to update the values in the DD, MM, YYYY inputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants