简体   繁体   English

在asp.net中使用Javascript对两个DateTime Picker进行组验证

[英]Group Validation of Two DateTime Picker Using Javascript in asp.net

在asp.net中使用Javascript对两个DateTime Picker进行组验证

Well, 好,

I here is what I am thinking. 我在这里就是我的想法。 You have 2 textboxes, each has a DateTime picker wired up to it, either via the AjaxControlToolkit, or JQuery UI (or similar framework). 您有2个文本框,每个文本框都通过AjaxControlToolkit或JQuery UI(或类似框架)连接到DateTime选择器。

In order to validate those, you can assign a class name (date) eg: 为了验证它们,您可以分配一个类名(日期),例如:

and validate this via the JQuery Validate plugin. 并通过JQuery Validate插件对此进行验证。 It uses class names to create custom validation for specific input formats, etc... There is also the capability to use your own regular expression with it, and therefore customize it to your specific needs. 它使用类名来为特定输入格式等创建自定义验证。...还可以使用您自己的正则表达式,因此可以根据您的特定需求对其进行自定义。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM