Material-ui-pickers: DatePicker: null value for maxDate and minDate

Created on 15 Mar 2018  路  1Comment  路  Source: mui-org/material-ui-pickers

For DatePicker, the default value for minDate and maxDate is '1900-01-01' and '2100-01-01' respectively. When I set one of these values to null, I expected the control would take up the default value, because for most of the react components, setting a property to null would mean the same as not having it set.

However, DatePicker behaves a little unexpected. It prevents the selection of any date. I can not see any reason for this behavior and would suggest that setting minDate or maxDate to null shall mean the same as setting them to undefined and the same as not having set them.

Most helpful comment

Use undefined to make minDate fill with default value

>All comments

Use undefined to make minDate fill with default value

Was this page helpful?
0 / 5 - 0 ratings