Skip to content

Dayjs should parse date in strict mode #347

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Vincz
Copy link

@Vincz Vincz commented Feb 1, 2022

Fix #346
To avoid the input text to be parsed to early, parse text in strict mode.

Fix react-component#346 
To avoid the input text to be parsed to early, parse text in strict mode.
@vercel
Copy link

vercel bot commented Feb 1, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/picker/ECcHMcPM1fCbHmBH9WNHwbnMftgH
✅ Preview: https://picker-git-fork-vincz-patch-1-react-component.vercel.app

@hahatulk
Copy link

thank you for fix 👍

@afc163 afc163 requested a review from iamkun October 17, 2022 02:56
@@ -115,7 +115,7 @@ const generateConfig: GenerateConfig<Dayjs> = {
parseNoMatchNotice();
return null;
}
const date = dayjs(formatText, format).locale(localeStr);
const date = dayjs(formatText, format, null, true).locale(localeStr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://day.js.org/docs/en/parse/string-format

seems dayjs(formatText, format, true) is better here?

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

Successfully merging this pull request may close these issues.

DayJs time picker strange behavior
3 participants