[DateRangePicker] Allow same date selection
See original GitHub issue <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])
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (8 by maintainers)
Top Results From Across the Web
[DateRangePicker] Allow same date selection #23603 - GitHub
As far as I know, there are no valid use cases for it, no matter a date picker, time picker, date range picker,...
Read more >daterange picker both date same - Stack Overflow
You are using an older version of daterangepicker so update your daterangepicker js and css which can solve your issue.
Read more >Date Range Picker — JavaScript Date & Time Picker Library
singleDatePicker : (true/false) Show only a single calendar to choose one date, instead of a range picker with two calendars. The start and...
Read more >DateRangePicker API - Material-UI Pickers
Name Type Default
value * RangeInput
acceptRegex RegExp /\dap/gi
allowKeyboardControl boolean currentWrapper !== 'static'
Read more >Range Restriction in JavaScript DateRangePicker control
You can restrict the minimum and maximum date that can be allowed as start and end date in a range selection with the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have this problem also. I would appreciate if it could be fixed as fast as possible. Thanks!
@hmaddisb I think that we can try a pull request 😃, we would need to add a test.