I need update events of calendar dynamically, when i create calendar the events works fine, but if I change the value of events and update calendar its no updated on ui.
var hoje = new Date();
today = new Date(hoje.getFullYear(), hoje.getMonth(), hoje.getDate());
var eventos = [{date: today, color: ‘#ff0000’}]
var calendario = app.calendar.create({
containerEl: ‘#calendar’,
dateFormat: ‘dd M yyyy’,
value: [new Date()],
weekHeader: false,
events: eventos,
})
setTimeout(function(){
eventos = [{date: today, color: ‘#ff0000’},{date: today, color: ‘#0000ff’},{date: today, color: ‘#00ff00’}];
calendario.update();
}, 5000)
thanks