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

dayjs('06/12/2024','DD/MM/YYYY') is returning wrong date ( june 12) instead of December 6th #2790

Open
hshahul opened this issue Dec 18, 2024 · 2 comments

Comments

@hshahul
Copy link

hshahul commented Dec 18, 2024

I am updating the latest version for Dayjs and comparing the date functionality but it is returning wrong date instead of correct, I selected December 6th from date picker and comparing the date but it is showing wrong value

@ruanvmHWS
Copy link

@hshahul did you extend dayjs with the customParseFormat plugin?

import dayjs from 'dayjs';
import customParseFormat from 'dayjs/plugin/customParseFormat';
dayjs.extend(customParseFormat);

...

const result = dayjs('06/12/2024','DD/MM/YYYY');

@hshahul
Copy link
Author

hshahul commented Dec 19, 2024

@ruanvmHWS Thanks for your response.. I have tried with customParseFormat plugin only but not luck.. I have seen same issue is other thread also

https://runkit.com/embed/w7op0120g88z

#2658

i think latest version is not supporting the formate DD/MM/YYYY, have any solution for this

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

No branches or pull requests

2 participants