带有 99:99 时间掩码的 ASP.net Toolkit 掩码编辑控件

发布于 2024-07-12 00:58:30 字数 229 浏览 3 评论 0原文

我正在尝试使用 asp.net ajax 工具包屏蔽编辑控件来获取小时/分钟输入,并设置掩码 99:99 和 masktype="time" 属性。

然而,它似乎没有对客户端或服务器端进行任何时间验证......它允许我输入任何数字,例如 88:77,这不是有效时间。

这是控件中的错误还是有某种方法可以将其配置为采用小时/分钟组合,如果不可能,您可以建议一个允许它的免费控件。

谢谢

I am trying to use the asp.net ajax toolkit masked edit control to take an hour/minute input with the mask 99:99 and the masktype="time" property set.

However it doesn't seem to do any time validation client or server side.... it allows me to input any numbers like 88:77 which isn't a valid time.

Is this a bug in the control or is there some way to configure it to take an hour/minute combination, if its not possible can you suggest a free control that allows it.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

饮湿 2024-07-19 00:58:30

这可能是一个愚蠢的问题,但是您也向页面添加了一个 MaskedEditValidator 控件,并将其连接起来?

<ajaxToolkit:MaskedEditValidator
  ControlExtender="MaskedEditExtender2" />

它们是已添加到您的页面的单独控件。

预计到达时间:
另外,如果您还没有添加至少一个“InvalidValueBlurredMessage”(如果“IsValidEmpty”设置为 false,则添加“EmptyValueMessage”)或“OnInvalidCssClass”,验证器将不会在客户端执行任何操作。

This may be a silly question, but you have added a MaskedEditValidator control to the page as well, and wired it up?

<ajaxToolkit:MaskedEditValidator
  ControlExtender="MaskedEditExtender2" />

They are seperate controls that have the added to your page.

ETA:
Also, if you haven't added at least an "InvalidValueBlurredMessage" (and "EmptyValueMessage" if "IsValidEmpty" is set to false) or "OnInvalidCssClass" the validator won't appear to do anything on the client side.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文