-1
在Mobiscroll日曆上(http://mobiscroll.com/),您可以在初始化Mobiscroll日曆時設置標記日期。日曆初始化後有沒有更新標記日期的方法?我似乎無法找到在文檔中這樣做的方法。更新Mobiscroll日曆上的標記日期
在Mobiscroll日曆上(http://mobiscroll.com/),您可以在初始化Mobiscroll日曆時設置標記日期。日曆初始化後有沒有更新標記日期的方法?我似乎無法找到在文檔中這樣做的方法。更新Mobiscroll日曆上的標記日期
實施例從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']
};
}
});
});