praveenpuglia / vuetify-daterange-picker

The missing date range picker for Vuetify JS you have been looking for.
https://vuetify-daterange-picker.gitbook.io/docs
MIT License
197 stars 59 forks source link

How to reset daterange value? #48

Closed sergiofactvs closed 5 years ago

sergiofactvs commented 5 years ago

Hi, it is possible to reset the daterange input value?

praveenpuglia commented 5 years ago

Hi!

This option doesn't yet exist. I was wondering how to do this. Would you like it as a method you can call on the ref to the component?

So you could do something like

<v-daterange ref="daterange"></v-daterange>

and then in JS

// somewhere in your code
this.$refs.daterange.reset();

This could very well be extended in the UI as well by giving a reset button.

mr-africa commented 5 years ago

@sergiofactvs You can use clearable option of text-field also.

        <v-daterange
            v-model="dateRange"
            :input-props="{
                clearable: true
            }"
        />
mr-africa commented 5 years ago

But clearable option in input-props just clear input and don't clear daterange value. @praveenpuglia could you add real clearable option to the component please

praveenpuglia commented 5 years ago

I'll work on it this week.

praveenpuglia commented 5 years ago

Hi! There's now a way to reset the picker. Please check this out - https://vuetify-daterange-picker.gitbook.io/docs/api#show-reset

hellowest commented 4 years ago

Hi Guys,

I'm working the vuetify date range picker and the reset option , its still not available from what I'm seeing. Some news on this subject ? Thank you.