您在daterangepicker站点上有很好的文档和配置生成器。你应该使用对象,像这样:locale
$(document).ready(function() {
$('#date-range-picker').daterangepicker({
format: 'YYYY/MM/DD',
dateLimit: { days: 30 },
locale: {
"format": "MM/DD/YYYY",
"separator": " - ",
"applyLabel": "Apply",
"cancelLabel": "Cancel",
"fromLabel": "From",
"toLabel": "To",
"customRangeLabel": "Custom",
"daysOfWeek": [
"Su",
"Mo",
"Tu",
"We",
"Th",
"Fr",
"Sa"
],
"monthNames": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"firstDay": 1
},
},
function(start, end, label) {
console.log(start.toISOString(), end.toISOString(), label);
});
});