2013-06-26 41 views

回答

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'] 
      }; 
     } 
    }); 
});