Reputation:
i'm trying to use this control to check a time (HH:MM) a user inserts...
This is what i'm using but not working
<telerik:RadTextBox ID="txtEstimation" runat="server">
</telerik:RadTextBox>
<telerik:RadInputManager ID="RadInputManager1" runat="server">
<telerik:RegExpTextBoxSetting EmptyMessage="EmptyMessage" ValidationExpression="(([01][0-9])|(2[0-3])):[0-5][0-9]"
ErrorMessage="*">
<TargetControls>
<telerik:TargetInput ControlID="txtEstimation" />
</TargetControls>
</telerik:RegExpTextBoxSetting>
</telerik:RadInputManager>
I was inspired by this : http://www.telerik.com/help/aspnet-ajax/input-inputmanager-basics.html Thanks in advance for your help
Upvotes: 0
Views: 1490
Reputation: 4524
The purpose of the RadInputManager is to convert standard controls to RadControls at runtime. Therefore, you should either have the RadInputManager
OR the RadTextBox
, but you don't need both.
You can achieve the HH:MM functionality you want with either way you choose. For example:
<telerik:RadTextBox ID="RadTextBox1" runat="server">
</telerik:RadTextBox>
<asp:RegularExpressionValidator
id="txtValidator"
runat="server"
Display="Dynamic"
ErrorMessage="Please, enter valid time in HH:MM format."
ValidationExpression="^((?<Hour>[0-9]{1,2})[.:](?=[0-9]{2}))?(?<Minute>[0-9]{1,2})$"
ControlToValidate="RadTextBox1">
</asp:RegularExpressionValidator>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" />
http://www.telerik.com/help/aspnet-ajax/input-textbox-limiting-allowable-values.html
Upvotes: 1