material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

trouble with datePicker defaultDate parameter

Open francescabarbazeni87 opened this issue 10 years ago • 1 comments

Hi,

I'm not able to change "defaultDate" parameter, it remains setted on today's date. I've tried to set "value", "minDate" and "maxDate" parameters with the same date type variable and work well, the problem seems to be only on "defaultDate" parameter.

Thanks

francescabarbazeni87 avatar Dec 21 '15 14:12 francescabarbazeni87

The defaultDate property is supposed to only be used during the first render. If you need to change the date later, the DatePicker need to behave like a controlled component. Hence, I think that it should be handled by the date property. I'm not sure this is implemented.

oliviertassinari avatar Dec 21 '15 14:12 oliviertassinari