gpt4 book ai didi

javascript - beforeShowDay 每天调用两次

转载 作者:行者123 更新时间:2023-11-30 06:37:37 26 4
gpt4 key购买 nike

我如何防止函数 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

Picture Example

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

您好!

最佳答案

根据 this jquery 用户界面示例:

$(function() {
$( "#datepicker" ).datepicker({
showOtherMonths: true,
selectOtherMonths: true,
numberOfMonths: 2
});
});

关于javascript - beforeShowDay 每天调用两次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13530552/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com