Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VDatePicker): using the start range that has been cleared #19869

Merged
merged 2 commits into from
May 29, 2024

Conversation

TIM56887
Copy link
Contributor

Description

fixes #19854
Added a condition to reset the rangeStart.value to undefined when the model's value array is empty

Markup:

<template>
  <v-container>
    <v-row justify="space-around">
      <v-date-picker v-model="date" multiple="range"></v-date-picker>
    </v-row>
    <v-row justify="space-around">
      <v-btn @click="clearDate">Clear</v-btn>
    </v-row>
  </v-container>
</template>

<script setup>
  import { ref } from 'vue'

  const date = ref([])

  const clearDate = () => {
    date.value = []
  }
</script>

@TIM56887 TIM56887 changed the title fix(VSelect): using the start range that has been cleared fix(VDatePicker): using the start range that has been cleared May 23, 2024
@TIM56887 TIM56887 force-pushed the fix/19854-v-date-range-picker branch from 7eb4d20 to 3b8bf46 Compare May 25, 2024 10:55
@MajesticPotatoe MajesticPotatoe added T: bug Functionality that does not work as intended/expected C: VDatePicker VDatePicker labels May 27, 2024
@johnleider johnleider added this to the v3.6.x milestone May 29, 2024
@johnleider johnleider merged commit f401f41 into vuetifyjs:master May 29, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VDatePicker VDatePicker T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.6.7] v-date-picker range selection when cleared doesn't start a new range
3 participants