Warning: file_exists(): File name is longer than the maximum allowed path length on this platform (260): C:\wwwroot\www.ynlykl.com/wp-content/themes/mkBlog/single-post-%e3%80%90element-ui%e3%80%91el-date-picker%e5%a6%82%e4%bd%95%e9%99%90%e5%88%b6%e9%80%89%e6%8b%a9%e6%97%b6%e9%97%b4%e4%b8%ba%e5%bd%93%e5%a4%a9%e4%b9%8b%e5%89%8d%e5%8c%85%e5%90%ab%e6%97%b6%e5%88%86.php in C:\wwwroot\www.ynlykl.com\wp-includes\template.php on line 703

Warning: file_exists(): File name is longer than the maximum allowed path length on this platform (260): C:\wwwroot\www.ynlykl.com/wp-content/themes/mkBlog/single-post-%e3%80%90element-ui%e3%80%91el-date-picker%e5%a6%82%e4%bd%95%e9%99%90%e5%88%b6%e9%80%89%e6%8b%a9%e6%97%b6%e9%97%b4%e4%b8%ba%e5%bd%93%e5%a4%a9%e4%b9%8b%e5%89%8d%e5%8c%85%e5%90%ab%e6%97%b6%e5%88%86.php in C:\wwwroot\www.ynlykl.com\wp-includes\template.php on line 706

Warning: file_exists(): File name is longer than the maximum allowed path length on this platform (260): C:\wwwroot\www.ynlykl.com/wp-includes/theme-compat/single-post-%e3%80%90element-ui%e3%80%91el-date-picker%e5%a6%82%e4%bd%95%e9%99%90%e5%88%b6%e9%80%89%e6%8b%a9%e6%97%b6%e9%97%b4%e4%b8%ba%e5%bd%93%e5%a4%a9%e4%b9%8b%e5%89%8d%e5%8c%85%e5%90%ab%e6%97%b6%e5%88%86.php in C:\wwwroot\www.ynlykl.com\wp-includes\template.php on line 709
【Element UI】el-date-picker如何限制选择时间为当天之后(包含时分秒) | 越努力越快乐

【Element UI】el-date-picker如何限制选择时间为当天之后(包含时分秒)

gengboxb 646 0
   pickerOptions: {
         selectableRange:(()=>{
          let data=new Date();
                let hour=data.getHours();
                let minute=data.getMinutes();
                let second=data.getSeconds();
                return [`${hour}:${minute}:${second} - 23:59:59`]
          })(),
        disabledDate(time) {
            var date=new Date();
             date.setFullYear(date.getFullYear()+2);
             date.setDate(date.getDate()-1);
                 return (time.getTime() < Date.now() - 8.64e7)||(time.getTime()>date.getTime());
          }
      }

发表评论 取消回复
表情 图片 链接 代码

分享