V-calendar: How to fire function on date-picker update?

Created on 9 Nov 2018  路  3Comments  路  Source: nathanreyes/v-calendar

This might seem like a stupid question, but I can't seem to figure out how to fire a function when the date changes. I am using the date-picker as follows:

    <v-date-picker
        mode="range"
        v-model="selectedDate"
        show-caps>
    </v-date-picker>

This shows a input on my page, and when you click it, the date picker opens, when changing dates in there, the input also updates.

How can I fire one of my methods upon change?

Most helpful comment

Here:

<v-date-picker
        mode="range"
        v-model="selectedDate"
        @input="handleInput"
        show-caps>
    </v-date-picker>

....
handleInput(val){
        // do what you want with val
    },

All 3 comments

Here:

<v-date-picker
        mode="range"
        v-model="selectedDate"
        @input="handleInput"
        show-caps>
    </v-date-picker>

....
handleInput(val){
        // do what you want with val
    },

Thanks!

@input seems to fire on component load as well as update...is there a way to fire only on update and not initial load?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeffster9 picture jeffster9  路  3Comments

jvincent3 picture jvincent3  路  4Comments

garygreen picture garygreen  路  3Comments

Nadavrbn picture Nadavrbn  路  3Comments

octaviangrozman picture octaviangrozman  路  4Comments