为了账号安全,请及时绑定邮箱和手机立即绑定

删除过去的日期 - Jquery Datepicker

删除过去的日期 - Jquery Datepicker

jeck猫 2021-11-25 16:50:42
您将 .catch() 附加到 setState() 而不是 .then()改变:axios      .delete(apiVideoUrl, {})      .then((response: any) => {        this.setState({          adminhelpcard: adminhelpcard.filter((adminhelpcard: SingleAdminHelpCard) => adminhelpcard.id !== id)        }).catch(function(error) {          console.log(error);        });到:axios   .delete(apiVideoUrl, {})   .then((response:any) => {        this.setState({            adminhelpcard: adminhelpcard.filter((adminhelpcard: SingleAdminHelpCard) => adminhelpcard.id !== id)        })    }).catch(function(error) {        console.log(error);    });
查看完整描述

1 回答

?
慕雪6442864

TA贡献1812条经验 获得超5个赞

尝试使用 minDate


$('#datepicker').datepicker({

  minDate: '0d',

  beforeShowDay: function(date) {

    // 0 - Sunday, 1 - Monday

    return [date.getDay() == 0 || date.getDay() == 1 ? false : true];

  }

});

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet" />


<input id="datepicker"/>


查看完整回答
反对 回复 2021-11-25
  • 1 回答
  • 0 关注
  • 130 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信