Page 1 of 1

How set default value for Calendar ?

Posted: 21 Oct 2021, 00:58
by atach
I am trying to set a default value for a calendar.
I made a data link through the model and try to set the value in different ways, but it doesn't work.

Code: Select all

......
<Calendar id="range" v-model="dateTest" selectionMode="range" dateFormat="dd.mm.yy" />                                
......

export default {
    name: "TrainerSchedule",
    mixins: [TableLazy],
    props: {
        trainer: {}
    },
    data() {
        return {
            .....
            dateTest: null,
//            dateTest: "30.09.2021 - 29.11.2021",
//            dateTest: [ "2021-09-30T21:00:00.000Z", "2021-11-29T21:00:00.000Z" ],
//            dateTest: [ "30.09.2021", "29.11.2021" ],
            ....
        }
    },                                
 

Re: How set default value for Calendar ?

Posted: 21 Oct 2021, 09:05
by atach
I'm sorry, I found the answer myself

Code: Select all

dateTest: [new Date(), new Date()]

Re: How set default value for Calendar ?

Posted: 12 Nov 2021, 14:57
by tugce.kucukoglu
Thanks for the feedback.