我希望从星期六到星期六选择一个星期或几个星期。但是我根本找不到解决方案。这是我已经做过的:
$(function () {
// Si minimum_retail (minimum à prendre en jour) est supp à 1
if (minimum_retail > 1) {
weekpicker = 'week'
} else {
weekpicker = false;
}
$('#datepicker').dateRangePicker({
firstDay: 2,
alwaysOpen: true,
format: 'DD/MM/Y',
separator: ' au ',
minDays: minimum_retail,
startOfWeek: 'monday',
batchMode: weekpicker,
maxDate: "+1y",
language: 'fr',
inline: true,
container: '#datePicker',
showTopbar: false,
beforeShowDay: function (date) {
var string = jQuery.datepicker.formatDate('yy-mm-dd', date);
var y = date.getFullYear().toString();
var m = (date.getMonth() + 1).toString();
var d = date.getDate().toString();
if(m.length == 1){ m = '0' + m; }
if(d.length == 1){ d = '0' + d; }
var currDate = y+'-'+m+'-'+d;
if (greetings.indexOf(currDate) >= 0){
return [true, "ui-highlight"];
}
if (unavailableDates) {
return [unavailableDates.indexOf(string) == -1]
}
}
});
});
谢谢您的帮助。