0

在显示 numberOfMonths: 3 中,当我点击第二个月的某个日期时,它是向左滑动的。是否有可能禁用此效果?

4

2 回答 2

0

您可能希望使用 JQuery UI 日期选择器的默认功能。下方链接。基本上去掉了动画代码。

http://jqueryui.com/datepicker/#default

删除与此相似的代码: $( "#anim" ).change(function() { $( "#datepicker" ).datepicker( "option", "showAnim", $( this ).val() ) ; });

于 2013-03-11T21:04:18.317 回答
0

我发现在github.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/issues/9上,启用了“幻灯片效果”,但是当您超出选定的 3 个月份时,它比之前:在您添加的每个日期,您都会返回所选的 3 个月。

onSelect:function (dateText, inst) {
    var newDate = new Date();
    inst.drawMonth = newDate.getMonth();
    inst.drawYear = newDate.getFullYear();
    inst.currentMonth = newDate.getMonth();
    inst.currentYear = newDate.getFullYear();
}

这段代码使左上角的月份在每次选择时始终相同(在本例中为当前月份)。所以还在找...

于 2013-03-12T15:05:01.517 回答