[SOLVED] How to update calendar date after initalized?

Hello,

How to update calendar date using js, I want to update calendar date on the fly,
i have tried with setValue method but its not update on calendar

self.calendarInlineEnd.setValue([new Date(2018,11,29)]);
self.calendarInlineEnd.update();

calendar initalization code:

   self.calendarInlineEnd = myApp.calendar.create({
        containerEl: '#calendar-inline-end',
        value: [start._d],
        weekHeader: true,
        toolbar: false,
        dayNamesShort: weekNames,
        dateFormat: "yyyy-mm-dd",
        inputEl: '#to_date',
      }
    });

I have also try to modify using params but still its not working on UI:
self.calendarInlineEnd.params.value=new Date(2018,11,29);
self.calendarInlineEnd.update();

Thanks

This is correct and it works:

Yes is update using this and i have already tried at that way but its not update on ui render.

After updating using setvalue when i grab value then it will send me correct date but its not actually affect to ui calendar? Is any other method? Or can i update whole ui?

This method updates UI, otherwise provide live example or JSFiddle where it doesn’t work

1 Like

Its works, for me now

Thanks