Skip to content

Commit

Permalink
fix(VDatePickerMonth): range bug with programmatic startdate
Browse files Browse the repository at this point in the history
fix(VDatePickerMonth): range bug with programmatic startdate
resolves vuetifyjs#20168
  • Loading branch information
zentek-cintia-dewi committed Jul 15, 2024
1 parent b1f74e1 commit 1be0faf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { useDate } from '@/composables/date/date'
import { MaybeTransition } from '@/composables/transition'

// Utilities
import { computed, ref, shallowRef, watch } from 'vue'
import { genericComponent, propsFactory } from '@/util'
import { computed, ref, shallowRef, watch } from 'vue'

// Types
import type { PropType } from 'vue'
Expand Down Expand Up @@ -93,11 +93,15 @@ export const VDatePickerMonth = genericComponent<VDatePickerMonthSlots>()({

if (model.value.length === 0) {
rangeStart.value = undefined
} else if (model.value.length === 1) {
rangeStart.value = model.value[0]
rangeStop.value = undefined
}
if (!rangeStart.value) {
rangeStart.value = _value
model.value = [rangeStart.value]
} else if (!rangeStop.value) {
console.log('rangeStart.value', rangeStart.value)
if (adapter.isSameDay(_value, rangeStart.value)) {
rangeStart.value = undefined
model.value = []
Expand Down

0 comments on commit 1be0faf

Please sign in to comment.