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 for date-time are misleading. #17497

Closed
manzoorwanijk opened this issue Sep 20, 2019 · 2 comments · Fixed by #17498
Closed

Docs for date-time are misleading. #17497

manzoorwanijk opened this issue Sep 20, 2019 · 2 comments · Fixed by #17498
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended [Type] Developer Documentation Documentation for developers

Comments

@manzoorwanijk
Copy link
Member

Describe the bug
The docs for DateTimePicker mention the prop isInvalidDate, but it's never passed to the inner DatePicker component.

Wasted so much of my time thinking that my code is wrong :(

@swissspidy swissspidy added [Package] Components /packages/components [Type] Bug An existing feature does not function as intended [Type] Developer Documentation Documentation for developers labels Oct 1, 2019
@mkaz
Copy link
Member

mkaz commented Oct 22, 2019

This is partially a documentation bug, but it is also the way the component is packaged.

The date-time directory exports the DateTimePicker, DatePicker, and TimePicker. The one readme documentation file does not expose each of the components, and which props go with which.

The DatePicker does receive the isInvalidDate property, but the DateTimePicker components, which includes the DatePicker does not pass it forward. So one fix should be passing the prop forward.

Additionally, it seems like the DatePicker and TimePicker should be moved to their own component directory. @ItsJonQ what do you think?

@ItsJonQ
Copy link

ItsJonQ commented Oct 22, 2019

Additionally, it seems like the DatePicker and TimePicker should be moved to their own component directory.

@mkaz I agree. It would avoid confusion and provide an opportunity to create README and stories for these components as well. I think your explanation of how it currently works is reason enough to refactor :).

I'm guessing to avoid breaking previous implementations of DatePicker, DatePicker/index.js would have to import/export the relocated DatePicker and TimePicker components.

@manzoorwanijk A real bummer to hear that this component gave you trouble <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants