How set default value for Calendar ?

UI Components for Vue
Post Reply
atach
Posts: 4
Joined: 04 Aug 2021, 17:38

21 Oct 2021, 00:58

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" ],
            ....
        }
    },                                
 

atach
Posts: 4
Joined: 04 Aug 2021, 17:38

21 Oct 2021, 09:05

I'm sorry, I found the answer myself

Code: Select all

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

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

12 Nov 2021, 14:57

Thanks for the feedback.

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests