是否可以配对两个日期选择器,但仍然允许选择同一天.
$('#depart, #departc, #depart_modify').Zebra_DatePicker({
format: 'd/m/Y',
selectWeek: true,
inline: true,
pair: $('#return, #returnc'),
firstDay: 1
});
$('#return, #returnc, #depart_review').Zebra_DatePicker({
format: 'd/m/Y',
selectWeek: true,
direction: 0
});
但结束日期选择器仍然禁止在同一天选择开始日期和结束日期.
解决方法:
试试这个
$('#depart, #departc, #depart_modify').Zebra_DatePicker({
format: 'd/m/Y',
selectWeek: true,
inline: true,
pair: $('#return, #returnc'),
firstDay: 1,
direction: true // add this line
});
$('#return, #returnc, #depart_review').Zebra_DatePicker({
format: 'd/m/Y',
selectWeek: true,
direction: true // change 0 to true
});