Dear all. I've made a control wich consists of WARP with WebDateChooser inside. I need to change the color of entered date (if holiday - date must be red, else - black). Here is my simple code:
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server">
<igsch:WebDateChooser ID="WebDateChooser1" runat="server" AllowNull="False"
Value="2008-07-21" EnableKeyboardNavigation="True">
<ClientSideEvents CalendarRenderDay="WebDateChooser1_CalendarRenderDay">
</ClientSideEvents>
<CalendarLayout FooterFormat="‘Today: {0:d}">
<DayHeaderStyle BackColor="#EEEEDE" BorderStyle="Outset">
<borderdetails styleleft="None" styleright="None" />
</DayHeaderStyle>
<OtherMonthDayStyle ForeColor="#999999" />
<SelectedDayStyle BackColor="#FFFFCC" ForeColor="Black" />
<TitleStyle BackColor="#A0C0FF" Font-Bold="True" />
<WeekendDayStyle ForeColor="#FF3300" />
<FooterStyle BackColor="#F3F2E7" />
<DropDownStyle BackColor="White">
</DropDownStyle>
</CalendarLayout>
</igsch:WebDateChooser>
</igmisc:WebAsyncRefreshPanel>
In Page_Load I check if it is PostBack, then i get Type of the entered date (Restday or Workday) and change the WebDateChooser.ForeColor property.
Hi,
I think that postback in your app happens due to submit of a Button on enter or something like. If you want to update datechooser on change value from server, then you need to enable autopostback of that datechooser. For example add to it
<AutoPostBack CalendarMonthChanged="True" ValueChanged="True" />