When using a MaskedEditExtender of Masktype Time, how to Ove

The following two lines work fine when input is correctly specified: TargetControlID=”MondayOpenTextBox” AcceptAMPM=”false” MaskType=”Time” Mask=”99:99″ />If the user enters “12″ then tabs to the next field, the minutes get populated with the current minute. This is not desirable for the page in question. I’d either like to popup an error message, or fill …

via Asp.Net Developed Tutorials » Search Results » ajax:

When using a MaskedEditExtender of Masktype Time, how to Ove

The following two lines work fine when input is correctly specified:

TargetControlID=”MondayOpenTextBox” AcceptAMPM=”false” MaskType=”Time”
Mask=”99:99″ />If the user enters “12″ then tabs to the next field, the minutes get populated with the current minute. This is not desirable for the page in question. I’d either like to popup an error message, or fill in “00″ for the skipped digits.
This does not help:
ControlToValidate=”MondayOpenTextBox” Display=”Dynamic” ErrorMessage=”X”
ValidationExpression=”dd:dd” />as the field is apparently formatted by the time the validator gets its turn at it.
………………………………………

You can set the AutoComplete property of your MaskedEdit extender to false in order to prevent it from filling the empty masked characters with the current time:
TargetControlID=”MondayOpenTextBox” AcceptAMPM=”false” MaskType=”Time”
Mask=”99:99″ AutoComplete=”False” />That way, your validator should be able to properly do its job.
………………………………………

To get it filled with :00 you can set the property AutoCompleteValue to “99:00″

For more info: When using a MaskedEditExtender of Masktype Time, how to Ove

Asp.Net Developed Tutorials » Search Results » ajax

When using a MaskedEditExtender of Masktype Time, how to Ove

Share this post:

Related Posts

Leave a Comment