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 ddf753e
Showing 1 changed file with 4 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 @@ -94,6 +94,9 @@ export const VDatePickerMonth = genericComponent<VDatePickerMonthSlots>()({
if (model.value.length === 0) {
rangeStart.value = undefined
}
if (model.value.length > 0 && !rangeStart.value) {
rangeStart.value = model.value[0]
}
if (!rangeStart.value) {
rangeStart.value = _value
model.value = [rangeStart.value]
Expand Down

0 comments on commit ddf753e

Please # to comment.