Nov 21, 2011, 7:51 AM
[CLOSED] DateField: How to I simulate the date validation?
Hi, I have a DateField with the following code:
<ext:DateField ID="dfDateRangeFrom" runat="server" EndDateField="dfDateRangeTo" Vtype="daterange" Format="dd-MMM-yyyy" Width="120" AltFormats="d-MMM-yyyy">
<ToolTips>
<ext:ToolTip ID="ToolTip1" runat="server" Html="Press <b>ENTER</b> to activate filter" />
</ToolTips>
<Listeners>
<Select Handler="ReloadTestList('dfDateRangeFrom');" />
<SpecialKey Fn="enterKeyPressHandler" />
</Listeners>
</ext:DateField>
If I enter a value like "1-NOV-2011", and click on another element, the value will automatically change to "01-NOV-2011". But if I do not click another field, the value will remain "1-NOV-2011" which will be considered as invalid (dfDateRangeFrom will contain 01/01/01 0001). My objective is to enable dfDateRangeFrom to recognize "1-NOV-2011" as a valid date so if there are an alternative solution, I will also appreciate it. Thanks!var enterKeyPressHandler = function(f, e) {
if (e.getKey() == e.ENTER) {
.......
// this will send the 2 dates to the backend for processing
}
}
Last edited by Daniil; Nov 22, 2011 at 7:27 AM.
Reason: [CLOSED]