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

Fix <DateField> props types #8844

Merged
merged 3 commits into from
Apr 21, 2023
Merged

Fix <DateField> props types #8844

merged 3 commits into from
Apr 21, 2023

Conversation

elstgav
Copy link
Contributor

@elstgav elstgav commented Apr 18, 2023

Clarifies the types for DateField. Both locales and options are expected to be used in .toLocaleDateString, which has more specific (and built-in/native) types we can leverage. Setting to more explicit types provides useful auto-correct and documentation.

@elstgav elstgav changed the title Clarify DateField options type Clarify DateField types Apr 18, 2023
Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

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

Indeed, thanks for pointing this out! 🙂

Could you also please update the type of options in the test DateField.spec.tsx line 110?

Thanks 🙂

@elstgav
Copy link
Contributor Author

elstgav commented Apr 20, 2023

@slax57 Done ✅. I made the changes through GitHub’s UI vs a full editor (hoping this is a small/simple edit 😄). Please let me know if I need to download locally to verify anything 👍🏻 (in case CI has some blindspots).

Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks! 🙂

@slax57 slax57 added this to the 4.9.4 milestone Apr 21, 2023
@slax57 slax57 merged commit f4335d5 into marmelab:master Apr 21, 2023
@slax57 slax57 changed the title Clarify DateField types Fix DateField props TS types Apr 21, 2023
@fzaninotto fzaninotto changed the title Fix DateField props TS types [TypeScript] Fix <DateField> props types Apr 23, 2023
@fzaninotto fzaninotto changed the title [TypeScript] Fix <DateField> props types Fix <DateField> props types Apr 23, 2023
@elstgav elstgav deleted the patch-1 branch May 31, 2023 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants