Open bulatgab opened 2 weeks ago
I think it's all about removing the first if
here (line 101 in VDatePickerMonth.tsx):
if (adapter.isSameDay(_value, rangeStart.value)) {
rangeStart.value = undefined
model.value = []
return
} else if (adapter.isBefore(_value, rangeStart.value)) {
rangeStop.value = adapter.endOfDay(rangeStart.value)
rangeStart.value = _value
} else {
rangeStop.value = adapter.endOfDay(_value)
}
Just to reiterate, the behaviour was correct in Vuetify 2. It was possible to click on the same date twice and choose it as a range.
Environment
Vuetify Version: 3.6.8 Last working version: 2.7.1 Vue Version: 3.4.27 Browsers: Firefox 126.0 OS: Mac OS 10.15
Steps to reproduce
We really need the user to be able to pick the same date as the start and the end in the v-date-picker (with multiple="range").
Expected Behavior
The user can click twice on the same date and get
[sameDate, sameDate]
as a valueActual Behavior
The date selection is reset on the second click
Reproduction Link
https://play.vuetifyjs.com/#...