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] Clock component is broken if minutesStep prop is not passed #7362

Closed
kiliancs opened this issue Jul 6, 2017 · 1 comment
Closed
Labels
component: time picker This is the name of the generic UI component, not the React module!

Comments

@kiliancs
Copy link

kiliancs commented Jul 6, 2017

Problem description

We are upgrading from 0.18.1 to 0.18.5 and found that the Clock component that was working well breaks now if the minutesStep prop is not passed.

The prop is not set as required and it doesn't have a default value. However, it is required to have a value because it is used in a calculation when the component mounts. Having an undefined minutesStep results in NaN showing up as the minutes.

This seems to have been introduced with 6ead93a, which means the problem first appeared in version 0.18.2.

Note that the format prop should also be required or have a default value, although this hasn't changed in recent versions.

I'd be happy to contribute a PR to fix this.

Link to minimal working code that reproduces the issue

[email protected] (no issues here): https://www.webpackbin.com/bins/-KoOpMlpk2KiDCRpOz7x
[email protected]: https://www.webpackbin.com/bins/-KoOpcYPkOmsoXsigImu

Versions

  • Material-UI: 0.18.5
  • React: 15.4.2
  • Browser: Tested on Firefox 54.0.1
@oliviertassinari oliviertassinari added the component: time picker This is the name of the generic UI component, not the React module! label Jul 14, 2017
@oliviertassinari
Copy link
Member

Closing for #4796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: time picker This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

2 participants