0

“今天的日期和接下来的两天日期”我的意思是每次有人想选择一个日期的前三天(今天,明天和明天之后)总是无法选择....

 if (!Modernizr.inputtypes.date) {
        var $dates = $("input[type=date]");
        $dates.each(function () {
            var thisDate = $(this);
            thisDate.datepicker({
                minDate: thisDate.attr("min"),
                maxDate: thisDate.attr("max"),
                dateFormat: "mm-dd-yy"
            });
        });

var array = ["2013-03-14", "2013-03-15", "2013-03-16"]仅禁用特定日期....请各位....找不到帮助以前的***强文本***帖子....必须是可能的....

4

2 回答 2

0
<script type="text/javascript">
    $("document").ready(function () {
        if (!Modernizr.input.placeholder) {
            makePlaceholders();
        }

        if (!Modernizr.inputtypes.date) {
            var $dates = $("input[type=date]");
            $dates.each(function () {
                var thisDate = $(this);
                thisDate.datepicker({
                    minDate: 3,
                    maxDate: thisDate.attr("max"),
                    dateFormat: "mm-dd-yy"


                });
            });
        }

         });


</script>
<script>
  $(document).ready(function() {
    $('#appointDate').datepicker({                  
        beforeShowDay: noSunday
      });

      function noSunday(date){
          var day = date.getDay();
                      return [(day > 0), ''];
      }; 

  });
  </script>
于 2014-04-23T15:03:29.520 回答
0
   if (!Modernizr.inputtypes.date) {
     var $dates = $("input[type=date]");
    $dates.each(function () {
        var thisDate = $(this);
        thisDate.datepicker({
            minDate: 3,
            maxDate: thisDate.attr("max"),
            dateFormat: "mm-dd-yy"
        });
      });
于 2014-04-22T13:14:16.893 回答