views:

2611

answers:

1

Hi,

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

+2  A: 

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.

Zhaph - Ben Duguid