Feb 22, 2011, 3:34 AM
[CLOSED] Displaying Todays date in Date field
Hi,,..
i have kept two date fields FromDate and Todate, i want display todyas date by default in both the fields..i have tried with ShowToday="true" but it is not displaying..if i keep Fromdate.Value=DateTime.Now, ToDate.Value=DateTime.Now in code behind
it will show error "Microsoft JScript runtime error: 'undefined' is null or not an object"... How to display Present date in both the fields?
i have kept two date fields FromDate and Todate, i want display todyas date by default in both the fields..i have tried with ShowToday="true" but it is not displaying..if i keep Fromdate.Value=DateTime.Now, ToDate.Value=DateTime.Now in code behind
it will show error "Microsoft JScript runtime error: 'undefined' is null or not an object"... How to display Present date in both the fields?
<ext:DateField ID="FromDate" runat="server" Width="130" ShowToday="true" Format="dd-MM-yyyy" Vtype="daterange" >
<CustomConfig>
<ext:ConfigItem Name="endDateField" Value="#{ToDate}" Mode="Value" />
</CustomConfig>
</ext:DateField>
<ext:DateField ID="ToDate" runat="server" Width="130" Format="dd-MM-yyyy" Vtype="daterange">
<CustomConfig>
<ext:ConfigItem Name="startDateField" Value="#{FromDate}" Mode="Value" />
</CustomConfig>
</ext:DateField>
Last edited by Daniil; Feb 22, 2011 at 10:41 AM.
Reason: [CLOSED]