我为开始日期和结束日期添加了日期选择器。结束日期日期选择器我想在开始日期之前禁用日期。您的任何帮助将不胜感激。这是代码。
// Pikadate datepicker
$('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year
format: "mmm dd, yyyy" // Generic date format as per US standard
});
// Pikadate datepicker $('.datepicker').pickadate({
$('#start_date').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year
format: "mmm dd, yyyy", // Generic date format as per US standard
});
$('#end_date').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year
format: "mmm dd, yyyy", // Generic date format as per US standard
min: new Date($('#start_date').val()),
});
此处min
在结束日期无效。