react-multi-date-picker icon indicating copy to clipboard operation
react-multi-date-picker copied to clipboard

DatePanel does not work when minDate is set with multiple enabled

Open EdithAllison opened this issue 1 year ago • 2 comments

When a minDate is set and multiple enabled, the panel does not update.

return (
		<DatePicker
			multiple
                       values={values}
			onChange={setValues}
			plugins={[
				<DatePanel />
			 ]}
			minDate={tomorrow}
			sort
    />
	)
Bildschirmfoto 2023-11-28 um 11 57 47

EdithAllison avatar Nov 28 '23 10:11 EdithAllison

UPDATE: this isn't an error with the date panel but with mindate & multiples. If I select mindate as the first selected date, the calendar behaves weirdly, for example the onChange and mapDays functions are not called.

Workaround: to get mindate to work with multiple dates, I have removed mindate and instead use the mapDays function to disable all dates that are smaller than tomorrow.

Here's a screenshot showing that if I select the mindate as first date, the input field is not correctly updated; but if I select any other date it works fine:

mindate-bug

EdithAllison avatar Dec 11 '23 11:12 EdithAllison

I have the same issue but wit max date