猿问

删除过去的日期 - Jquery Datepicker

您将 .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);

    });


jeck猫
浏览 131回答 1
1回答

慕雪6442864

尝试使用 minDate$('#datepicker').datepicker({&nbsp; minDate: '0d',&nbsp; beforeShowDay: function(date) {&nbsp; &nbsp; // 0 - Sunday, 1 - Monday&nbsp; &nbsp; return [date.getDay() == 0 || date.getDay() == 1 ? false : true];&nbsp; }});<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"/>
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答