|
109 | 109 | yearRange: { type: Array as PropType<number[]>, default: () => [1970, 2100] }, |
110 | 110 | range: { type: Boolean as PropType<boolean>, default: false }, |
111 | 111 | twoCalendars: { type: Boolean as PropType<boolean>, default: false }, |
| 112 | + twoCalendarsSolo: { type: Boolean as PropType<boolean>, default: false }, |
112 | 113 | calendarCellClassName: { type: String as PropType<string>, default: null }, |
113 | 114 | enableTimePicker: { type: Boolean as PropType<boolean>, default: false }, |
114 | 115 | is24: { type: Boolean as PropType<boolean>, default: true }, |
|
262 | 263 | years: years.value, |
263 | 264 | noHoursOverlay: props.noHoursOverlay, |
264 | 265 | noMinutesOverlay: props.noMinutesOverlay, |
| 266 | + twoCalendarsSolo: props.twoCalendarsSolo, |
265 | 267 | })); |
266 | 268 |
|
267 | 269 | const dpMenuClass = computed( |
|
281 | 283 | calendarDay.classData = { |
282 | 284 | dp__cell_offset: !calendarDay.current, |
283 | 285 | dp__pointer: !disabled && !(!calendarDay.current && props.hideOffsetDates), |
284 | | - dp__active_date: isActiveDate(calendarDay), |
| 286 | + dp__active_date: props.range ? false : isActiveDate(calendarDay), |
285 | 287 | dp__date_hover: |
286 | | - !disabled && !isActiveDate(calendarDay) && !(!calendarDay.current && props.hideOffsetDates), |
| 288 | + !disabled && |
| 289 | + !isActiveDate(calendarDay) && |
| 290 | + !(!calendarDay.current && props.hideOffsetDates) && |
| 291 | + (props.range |
| 292 | + ? !rangeActiveStartEnd(calendarDay) && !rangeActiveStartEnd(calendarDay, false) |
| 293 | + : true), |
287 | 294 | dp__range_between: |
288 | 295 | props.range && |
| 296 | + (props.twoCalendars ? calendarDay.current : true) && |
289 | 297 | !disabled && |
290 | 298 | !(!calendarDay.current && props.hideOffsetDates) && |
291 | 299 | !isActiveDate(calendarDay) |
|
296 | 304 | dp__cell_auto_range: isAutoRangeInBetween(calendarDay), |
297 | 305 | dp__cell_auto_range_start: isAutoRangeStart(calendarDay), |
298 | 306 | dp__cell_auto_range_end: isHoverRangeEnd(calendarDay), |
299 | | - dp__range_start: rangeActiveStartEnd(calendarDay), |
300 | | - dp__range_end: rangeActiveStartEnd(calendarDay, false), |
| 307 | + dp__range_start: props.twoCalendars |
| 308 | + ? calendarDay.current && rangeActiveStartEnd(calendarDay) |
| 309 | + : rangeActiveStartEnd(calendarDay), |
| 310 | + dp__range_end: props.twoCalendars |
| 311 | + ? calendarDay.current && rangeActiveStartEnd(calendarDay, false) |
| 312 | + : rangeActiveStartEnd(calendarDay, false), |
301 | 313 | [props.calendarCellClassName]: !!props.calendarCellClassName, |
302 | 314 | }; |
303 | 315 | return calendarDay; |
|
0 commit comments