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

[docs] Document the PickerValidDate type override #13476

Merged
merged 5 commits into from
Jun 14, 2024

Conversation

flaviendelangle
Copy link
Member

Closes #12640

@flaviendelangle flaviendelangle self-assigned this Jun 14, 2024
@flaviendelangle flaviendelangle added docs Improvements or additions to the documentation component: pickers This is the name of the generic UI component, not the React module! labels Jun 14, 2024
@flaviendelangle flaviendelangle changed the title [docs] Document the PickerValidDate type override [docs] Document the PickerValidDate type override Jun 14, 2024
@mui-bot
Copy link

mui-bot commented Jun 14, 2024

@flaviendelangle flaviendelangle marked this pull request as ready for review June 14, 2024 07:18
Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

Thank you for taking care of it! 🙏

flaviendelangle and others added 3 commits June 14, 2024 12:08
Co-authored-by: Lukas <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Lukas <llukas.tyla@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

One final suggestion. 🤔

All the date-related props are now strictly typed to only accept the date format supported by your adapter
(`Date` object for `date-fns`, `daysjs.Dayjs` object for `days-js`, etc.).

You can learn more about this change in the [dedicated doc section](/x/react-date-pickers/base-concepts/#typing-of-the-date).
Copy link
Member

Choose a reason for hiding this comment

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

You can also consider using the format suggested by Sam on how to name the links to other doc sections.

Suggested change
You can learn more about this change in the [dedicated doc section](/x/react-date-pickers/base-concepts/#typing-of-the-date).
:::info
See [Base concepts—Typing of the date](/x/react-date-pickers/base-concepts/#typing-of-the-date) for more details.
:::

Copy link
Member Author

Choose a reason for hiding this comment

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

Would you apply the same rational to the other "You can learn more" of the page?

Copy link
Member

Choose a reason for hiding this comment

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

It's just a suggestion, but especially in this section, I think that it would improve the visibility and importance of the link.
As for the other sections—it's up to you. Technically it's out of the scope of this issue, but I don't think it would hurt. 👌

Copy link
Member Author

Choose a reason for hiding this comment

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

It's out of the scope but it's a super simple change that is not worth a dedicated review IMHO, I'll do the switch 👌

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

I will do a follow up for the rest of the doc if I find some time

@flaviendelangle flaviendelangle merged commit 6b2b815 into mui:master Jun 14, 2024
17 checks passed
@flaviendelangle flaviendelangle deleted the valid-date-doc branch June 14, 2024 12:35
DungTiger pushed a commit to DungTiger/mui-x that referenced this pull request Jul 23, 2024
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Lukas <llukas.tyla@gmail.com>
thomasmoon pushed a commit to thomasmoon/mui-x that referenced this pull request Sep 9, 2024
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Lukas <llukas.tyla@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DesktopDatePickerProps<Date> error Type 'Date' does not satisfy the constraint 'never' in version 7.1.0
3 participants