Hii,
Using the Infragistics web Date Chooser, I want to hight light the any one day (Ex: All thursdays), ie particular day for color should be different from other days.
Take Example for thursday: All dates which is fall in thursdays, should be in red color.
Can anyone please help me how i can achieve this. This is very urgent requirement . Its very helpful if any one do helps to me.
Thanks
Vanji
Hi Manji.
WebCalendar has ClientSideEvents.renderDay. If application processes that event, then it may modify appearance and content of any day in calendar. Second param (oDay) has various members. You may look at docs for that event or put "debugger;" line in that event and check all its members.
Below example shows how to modify color of Thursdays. You can use either css or element.style.color.
<style type="text/css">.redClr{color:red;}</style><script type="text/javascript"> function WebDateChooser1_CalendarRenderDay(oCalendar, oDay, oEvent) { if(oDay.dow == 4) { // you can use oDay.css if(oDay.css.indexOf(' redClr') < 0) oDay.css += ' redClr'; // or you can use oDay.element explicitly and modify rendering completely //oDay.element.style.color = 'red'; } }</script><igsch:WebDateChooser ID="WebDateChooser1" runat="server"> <ClientSideEvents CalendarRenderDay="WebDateChooser1_CalendarRenderDay" > </ClientSideEvents></igsch:WebDateChooser>
thanks lot, its working fine.
One more question. can you please help me to sort out.
In webdatechooser when i remove the displayed date its showing null value, instead of this i want to display 00/00/0000, how i can achieve this.
Its great that if any one help for this problem.
Hi Svanji,
You may use NullDateLabel.
<igsch:WebDateChooser ID="WebDateChooser1" runat="server" NullDateLabel="00/00/0000"></igsch:WebDateChooser>
HI, can you please answer my below question.
i used Webdate chooser in my page form. While submitting i am handlilng some validation that date got selected or not. If not selected i have to display * near of this date control. I used Required Validator like below
</CalendarLayout></ig:WebDateChooser>
<asp:RequiredFieldValidator Display="Static">*</asp:RequiredFieldValidator>
In browser * has to display after the data control. But its displaying always next line. I didn't used any <br>. If i use regular ASP:Textbox, * is getting displaying next to the control
Can you please help me to sort out this problem.
For temprary solution, i used each <td><.td> for <ig:WebDateChooser> and <asp:RequiredFieldValidator >, this is not a good solution.
Hi svanji,
That happens because WebDateChooser uses TABLE element for its base html element. Browser uses display:block for TABLE, so, any html element will appear on new line.
If validator in aspx appears directly after WebDateChooser and WebDateChooser does not use position:absolute/relative, then you may try to use position:absolute with margins for validator (do not use left/top). Below is example for you:
<igsch:WebDateChooser ID="WebDateChooser1" runat="server" Width="150px"></igsch:WebDateChooser><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" style="position:absolute; margin-top:-20px; margin-left:153px;" ControlToValidate="WebDateChooser1" ErrorMessage="*"></asp:RequiredFieldValidator>