ManukMinasyan / vue-functional-calendar

Vue.js Functional Calendar | Component/Package
https://vue-functional-calendar.now.sh/
MIT License
468 stars 84 forks source link

Reset date value #75

Closed engineertdog closed 4 years ago

engineertdog commented 4 years ago

I'm unable to reset the calendar in a situation where clicking a button adds the current date + time info to another object, and then should reset the calendar to remove any selected dates / times.

I have also tried resetting the individual keys for the object, but have had no luck.

const outageDate = ref({});

....some function {
 outageDate.value= {};
}
ManukMinasyan commented 4 years ago

Hello @engineertdog . If you need reset selected values, you need to use v-model. Example: v-model="CustomInputCalendar"

CustomInputCalendarReset() {
                this.CustomInputCalendar.selectedDate = false
                this.CustomInputCalendar.dateRange =  {
                    start: {
                        date: false,
                    },
                    end: {
                        date: false,
                    }
                }
                this.CustomInputCalendar.selectedDates = []
            },

Thanks