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

[TimePicker] To match DatePicker value #4304

Closed
wants to merge 1 commit into from
Closed

[TimePicker] To match DatePicker value #4304

wants to merge 1 commit into from

Conversation

justinko
Copy link

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

@oliviertassinari
Copy link
Member

@justinko Could you explain your use case?
We also use the any type with the TextField component. But I think that we can be more strict regarding the value type here.

@justinko
Copy link
Author

I receive a warning if I set the TimePicker value to a string, because it expects an object ...

DatePicker is any:

https://github.com/callemall/material-ui/blob/master/src/DatePicker/DatePicker.js#L134

Why would TimePicker be different?

@oliviertassinari
Copy link
Member

I'm confused. Why do you provide a string to this value property?
As far as I know, this component only works with the date type. Hence, I think that we should be more strict with the propTypes.

@justinko
Copy link
Author

Ahh, okay, understood. I need to pass a Date object. Thanks!

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! component: time picker This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants