在pickadate.js`min`不起作用

时间:2016-07-06 07:24:37

标签: javascript jquery date

我为开始日期和结束日期添加了日期选择器。结束日期日期选择器我想在开始日期之前禁用日期。您的任何帮助将不胜感激。这是代码。

// 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在结束日期无效。

0 个答案:

没有答案