[DatePicker] Use DatePicker for ranged example min and max date selection#4010
[DatePicker] Use DatePicker for ranged example min and max date selection#4010oliviertassinari merged 1 commit intomui:masterfrom
Conversation
70d1db6 to
3754cd8
Compare
|
Note to reviewers that this change affects the ranged DatePicker example and replaces the two text inputs that specify the range itself and replace them with date pickers. Personally I'd use the name Otherwise, assuming the linting passes this looks like a reasonable change to me. |
|
@aahan96 - please also follow the PR template. |
| import TextField from 'material-ui/TextField'; | ||
| import Toggle from 'material-ui/Toggle'; | ||
|
|
||
| const DateTimeFormat = global.Intl.DateTimeFormat; |
There was a problem hiding this comment.
This could be undefined on browser that don't support Intl.
There was a problem hiding this comment.
What about using https://github.com/callemall/material-ui/blob/master/src/DatePicker/dateUtils.js instead?
657528d to
616dc97
Compare
|
@oliviertassinari Yeah, I just checked it and there was a mix match of both @mbrookes @owencm @nathanmarks I have changed |
|
@oliviertassinari Just wanted to check with the status of this pr. I have also added support for browsers that don't support the |
|
@aahan96 That looks good from a code point of view. I will try it out 👍. |
|
@aahan96 I appreciate you've gone to the trouble of making the displayed date look the same as the manual textfield that this replaces, but as this isn't a localisation example, I think the default ISO 8601 date is fine, and make the example code much simpler. 👍 |
|
@mbrookes I removed the localization example and the dates are now displayed in default ISO 8601 format. Thanks for the advice 👍 |
|
@aahan96 Thanks for doing that. Please could you also remove the default date from the first I can't decide whether the range-setting pickers should honor the toggles, but I guess it's harmless. 😄 |
|
@mbrookes Done! |
|
Thanks! Please go ahead and squash, and 'reword' the base commit title to match the PR title, and I think we can merge. 👍 |
…tion Fixed some issues with the pr Removed default date
|
@aahan96 Thanks, that feel better now! |

Now the ranged examples use
DatePickerforminDateandmaxDate.Closes issue #4009