我正在使用Multiple-Dates-Picker-for-jQuery-UI。选择多个日期时,日历会在每个选择之间打开和关闭。我该如何解决这个问题,以便日历保持打开状态,直到选中所有日期,然后只在浏览器中的其他地方点击时关闭日历。jQuery Multidatepicker日历在日期选择之间打开和关闭
这里是我的代码:
<div class="row">
<div class="span4">
<h3>On <a href="#" class="popover-tip" rel="popover"
data-content="Pick a date for your night out."
data-original-title="Date">
<i class="icon-question-sign"></i></a></h3>
<input type="text" class="datepicker">
// Date picker - allows for multi select
$('.datepicker').multiDatesPicker({
altField: '#altfield',
dateFormat: "DD, d MM, yy",
onBeforeShow: function() {
$('#inputDate').DatePickerSetDate($('#inputDate').val(), true);
},
onChange: function (formated, dates) {
$('#inputDate').val(formated);
if ($('#closeOnSelect input').attr('checked')) {
$('#inputDate').DatePickerHide();
}
}
});
感谢纳迦。我确实读过并尝试添加: \t table.ui-datepicker-calendar {border-collapse:separate;} \t .ui-datepicker-calendar td {border:1px solid transparent;} to the css as they建议,但它似乎没有影响 – Mac10
我清理了这个答案,但我不明白它是如何帮助的,因为它看起来像指的是同一个项目。 –