<DateRangePicker
startText="Created From"
endText="Created To"
allowSameDateSelection={true}
value={[
searchCriteria.beginDate,
searchCriteria.endDate,
]}
onChange={}
renderInput={(startProps, endProps) => (
<React.Fragment>
<TextField
{...produce(startProps, (draft) => {
draft.helperText = '';
})}
/>
<DateRangeDelimiter> to </DateRangeDelimiter>
<TextField
{...produce(endProps, (draft) => {
draft.helperText = '';
})}
/>
</React.Fragment>
)}
/>

i think the issue is in the validateDateRange function. This function not use the allowSameDateSelection to pass the validate of utils.isBefore(range[0], range[1])
I have this problem also. I would appreciate if it could be fixed as fast as possible. Thanks!
Please fix this. We need it!
This project is not supported anymore, it is moving to the material-ui/core https://github.com/mui-org/material-ui/pull/22692 but the PR is floating.
I`ll add a mention about this in readme
It looks like we should remove the allowSameDateSelection prop. The prop is described as:
As far as I know, there are no valid use cases for it, no matter a date picker, time picker, date range picker, etc. One thing that we have seen in the past is the capability to control the range that can be selected, this is a different problem and require a broader solution.
@oliviertassinari Is this a matter of applying the old PR to this repository or is there more to it?
@havgry I can't say. I didn't look at the pull request in detail.
Most helpful comment
I have this problem also. I would appreciate if it could be fixed as fast as possible. Thanks!