2

我怎样才能防止函数 beforeShowDay 每天调用一次?jquery datepicker 有两个月。

30.01.2013 -> month side jan
31.01.2013 -> month side jan
01.02.2013 -> month side jan (last invisible day / placehoder)
02.02.2013 -> month side jan (last invisible day / placehoder)
03.02.2013 -> month side jan (last invisible day / placehoder)
----------------------------    
28.01.2013 -> month side feb (first invisible day / placehoder)
29.01.2013 -> month side feb (first invisible day / placehoder)
30.01.2013 -> month side feb (first invisible day / placehoder)
31.01.2013 -> month side feb (first invisible day / placehoder)
01.02.2013 -> month side feb
01.02.2013 -> month side feb
02.02.2013 -> month side feb
02.02.2013 -> month side feb
03.02.2013 -> month side feb
03.02.2013 -> month side feb
04.02.2013 -> month side feb
04.02.2013 -> month side feb

图片示例

使用 beforeShowDay 我计算天数,如果某些天被调用两次,结果不正确......我怎样才能防止天数的双重调用?

问候!

4

1 回答 1

0

根据这个jquery ui 示例:

$(function() {
    $( "#datepicker" ).datepicker({
        showOtherMonths: true,
        selectOtherMonths: true,
        numberOfMonths: 2
    });
});
于 2012-11-23T14:02:16.727 回答