what would be the CalendarLayout called in case of :WebDatePicker
<igedit:WebDatePicker ID="statrdate" runat="server" Width="130px" AllowNull="True" Enabled="True" AutoCloseUp="true" ShowDropDown="False" NullDateLabel="Select End Date" NullValueRepresentation="DateTime_MinValue" > <ClientSideEvents ValueChanging="handle_ToDateChanged" InvalidValueEntered="handle_InvalidDateEntered" Blur="handle_ToDateOnBlur" /> <a:CalendarLayout DayNameFormat="FirstLetter" FooterFormat="" ShowFooter="False" ShowNextPrevMonth="False" ShowTitle="False"> <CalendarStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"> </CalendarStyle> <SelectedDayStyle CssClass="SelectedDay" /> <DayHeaderStyle CssClass="DateTimeDayHeader" /> <TitleStyle CssClass="DateTimeTitle" /> <DayStyle CssClass="DateTimeDay" /> </a:CalendarLayout> </igedit:WebDatePicker>
Also i am upgrading from webdateshooseer to webdatepicker , what shuld the following code me replaced with in WebDatepicker?
var fromDateControl = igdrp_getComboById(StartDateId);
I have javascrpt event for webdatechooser which i am looking to upgrade to webdatepicker , my webdatepicker clientside event is valuechanging how ever when trying to rewrite the code i could not understand the purpose of the oDate in wdc to be able to rewrite in wdp. kindly help asap.
function wdc_calenderValueChanging(oCalendar, oDate, oEvent)
{ validateFromDateChanged(oDate); oEvent.Cancel = true;}
function validateFromDateChanged(oDate) {var fromDateControl = igdrp_getComboById(StartDateId); / / var StartDateId = '<%=StartDate.ClientID%>'; var toDateControl = igdrp_getComboById(EndDateId); // var EndDateId = '<%=EndDate.ClientID%>'; validateFromDateChanged(fromDateControl, toDateControl, oDate);
}
function validateFromDateChanged(fromDateControl, toDateControl, oDate) { var fromDateTime = new Date(); fromDateTime = fromDateControl.getValue(); if (fromDateTime != null && oDate != null) { fromDateTime.setFullYear(oDate.getFullYear()); fromDateTime.setMonth(oDate.getMonth()); fromDateTime.setDate(oDate.getDate()); } var toDateTime = toDateControl.getValue();
if (toDateTime <= fromDateTime) { var temp = new Date(fromDateTime.getFullYear(), fromDateTime.getMonth(), fromDateTime.getDate(), fromDateTime.getHours(), fromDateTime.getMinutes(), fromDateTime.getSeconds()); toDateControl.setValue(temp); } fromDateControl.setValue(fromDateTime);}