react-multi-date-picker
react-multi-date-picker copied to clipboard
last day of maxDate can not be selected at 4.4.1 version!
you can check it here: https://codesandbox.io/s/react-multi-date-picker-forked-8szhdq
same issue here, and if passed the last minute of maxDate which is 23:59, it will be selectable but it sets the value immediately on opening the calendar.
Same here on 4.5.1. Minimal setup https://codesandbox.io/p/sandbox/recat-multi-62xs7c When you select the last date and then some other dates they'll all disappear after closing the calendar.
Any solution here?
@info2programmer after looking into the implementation of this library I've figured out there is an issue with initializing the DateObject. It uses current time which later fails when comparing dates. As as a workaround I'm passing DateObject initialized with a time (beginning of a day or end of a day):
minDate={
new DateObject({
date: '06/02/2024 00:00:01',
format: 'MM/DD/YYYY HH:mm:ss,
})
}
maxDate={
new DateObject({
date: '07/02/2024 23:59:59',
format: 'MM/DD/YYYY HH:mm:ss',
})
}