2013-06-26 1 views
-1

В календаре Mobiscroll (http://mobiscroll.com/) вы можете установить отмеченные даты при инициализации Календарь Mobiscroll. Есть ли способ обновить отмеченные даты после инициализации календаря? Кажется, я не могу найти способ сделать это в документации.Обновление отмеченных дат в календаре Mobiscroll

ответ

0

Пример из 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'] 
      }; 
     } 
    }); 
});