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

[Feature Request] v-date-input should allow to set a custom ISO 8601 date format (e.g. YYYY-MM-DD) #19996

Open
ian-ng opened this issue Jun 12, 2024 · 3 comments

Comments

@ian-ng
Copy link

ian-ng commented Jun 12, 2024

Problem to solve

I want to uniform the date format to "YYYY-MM-DD" (ISO 8601 format) to avoid user mistakes.
(current version is: mm/dd/yyyy, which is a confusing date format)

Proposed solution

adding a props like below:
<v-date-input
...
date-format="YYYY-MM-DD"
/>

@EDM115
Copy link

EDM115 commented Jun 13, 2024

2024-06-13_10-31-50.mp4

As you can see, typing DD/MM/YYYY doesn't work, but typing MM/DD/YYYY will work but will then be displayed as DD/MM/YYYY.
Note that my system is in French, and browser in English. dunno if it affects the component's logic

@ian-ng
Copy link
Author

ian-ng commented Jun 14, 2024

2024-06-13_10-31-50.mp4
As you can see, typing DD/MM/YYYY doesn't work, but typing MM/DD/YYYY will work but will then be displayed as DD/MM/YYYY. Note that my system is in French, and browser in English. dunno if it affects the component's logic

I have looked into the component, it seems affected by the Vuetify locale setting.

Currently, I am showing the date input in the old way (v-menu + v-text-field + v-date-picker ), and handling the date format with v-text-field.

@Sko007
Copy link

Sko007 commented Jul 8, 2024

Would be a great feature. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants