-1

On the Mobiscroll Calendar (http://mobiscroll.com/) you can set Marked Dates when initializing the Mobiscroll Calendar. Is there a way to update the Marked Dates after the calendar has been initialized? I can’t seem to find a method for doing so in the documentation.

1 Answers1

0

Example from the documentation:

$(function(){
    $('#calendar').mobiscroll().calendar({
        marked: { dates: [ new Date(2013, 5, 6), new Date(2013, 5, 10) ] }, // Initially marked days
        onMonthChange: function (year, month, inst) {
            // Load marked days for (year, month), (year, month - 1), (year, month + 1)

            // Update dates only
            inst.settings.marked.dates = [ new Date(year, month - 1, 15), new Date(year, month, 15), new Date(year, month + 1, 15) ];

            // OR Update the whole marked object (only if necessary)
            inst.settings.marked = {
                dates: [ new Date(year, month - 1, 15), new Date(year, month, 15), new Date(year, month + 1, 15) ],
                daysOfMonth: ['5/1', '12/24', '12/25']
            }; 
        }
    });
});
istvan.halmen
  • 3,320
  • 1
  • 23
  • 29