Oct 10, 2011, 10:33 AM
[CLOSED] Cancel button event if wrong date in datefield
Hi,
I have 2 datefield from and to (daterange), and I have 1 button. The button have direct event on it.
If I inputted wrong date format (when the red line shown in the datefields), and then click the button, I expect to cancel the event on the button and show error message.
How can I do this?
I am thinking to use listener for checking and direct method for the event. But how to check if the datefield is in the wrong format?
Thanks
I have 2 datefield from and to (daterange), and I have 1 button. The button have direct event on it.
If I inputted wrong date format (when the red line shown in the datefields), and then click the button, I expect to cancel the event on the button and show error message.
How can I do this?
I am thinking to use listener for checking and direct method for the event. But how to check if the datefield is in the wrong format?
Thanks
<ext:DateField ID="DateField_From" runat="server" EndDateField="DateField_To" Vtype="daterange"></ext:DateField>
<ext:DateField ID="DateField_To" runat="server" StartDateField="DateField_From" Vtype="daterange"></ext:DateField>
<ext:Button ID="Button1" runat="server" Text="Button1">
<DirectEvents>
<Click OnEvent="Button1_Event"></Click>
</DirectEvents>
</ext:Button>
Last edited by Daniil; Oct 14, 2011 at 4:25 PM.
Reason: [CLOSED]