Home > Web Front-end > JS Tutorial > body text

EasyUI Datebox date verification start date is less than end time example sharing

小云云
Release: 2018-01-11 14:36:32
Original
2439 people have browsed it

This article mainly introduces the EasyUI Datebox date verification that the start date is less than the end time. Friends who need it can refer to it. I hope it can help everyone.

Effect

Create date box


-

Copy after login

Custom easyui verification


//验证开始时间小于结束时间 
$.extend($.fn.validatebox.defaults.rules, {
  end: {
    validator: function (value, param) {
      var startDate = $("#StartsTime input").val();
      var startTmp = new Date(startDate.replace(/-/g, "/"));
      var endTmp = new Date(value.replace(/-/g, "/"));
      return startTmp <= endTmp;
    },
    message: '结束时间要大于开始时间!'
  }
})
Copy after login

Related recommendations:

How to solve the problem of hidden or unavailable Easyui-Datebox settings

jQuery EasyUI API Chinese Documentation - DateBox Date Box

jQuery EasyUI API Chinese Documentation - DateBox Date Box_PHP Tutorial

The above is the detailed content of EasyUI Datebox date verification start date is less than end time example sharing. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!