Set invalid dates using remote/dynamic data

Hello,

I’m using remote data through an external request, using the setEvents method to set the events.

But, I need also to set the invalid dates dynamically or using alson remote data. How can I achieve this?

Thanks

Hi there,

You can use the setOptions method for that:

myInstance.setOptions({
    invalid: [...]
});

Thanks Gabi, but I mean, dynamically, querying a database, as I set events per user basis like this:

mobiscroll.util.http.getJson(’/data/calendario.php?user_id=’+id, function (events) {
calendar.setEvents(events.cal);
}, ‘json’);

And each user has it’s own invalid dates.

Hi Chorch, this usage is applicable inside the json request as well.