This is a migrated thread and some comments may be shown as answers.
Highlight today date in datpicker
3 Answers 79 Views
This is a migrated thread and some comments may be shown as answers.
lakmal
Top achievements
Rank 2
lakmal asked on 14 Nov 2009, 03:34 AM
Hi,

This is my datepicker. How can i highlight today date in my datepicker.

<telerik:RadDatePicker ID="dtpDocStart"   Culture="en-GB"    
                                                    SharedCalendarID="sharedCalendar"  Width="100px"    runat="server"
                                                    CssClass="RadInput_Default">

<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>

<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                                                </telerik:RadDatePicker>
lakmal




3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 16 Nov 2009, 10:53 AM
Hi,

You can add the following code to highlight today's date in the RadDatePicker:
aspx:
<telerik:RadDatePicker ID="dtpDocStart" Culture="en-GB" Width="100px" runat="server" CssClass="RadInput_Default" SharedCalendarID="sharedCalendar"
            <Calendar runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"
               <SpecialDays> 
                  <telerik:RadCalendarDay Repeatable="Today" > 
                     <ItemStyle BackColor="Pink" /> 
                  </telerik:RadCalendarDay>                
               </SpecialDays> 
            </Calendar> 
            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> 
</telerik:RadDatePicker> 

Thanks
Shinu.
0
lakmal
Top achievements
Rank 2
answered on 16 Nov 2009, 11:58 AM
This is my datepicker still i cant see today date

  <telerik:RadDatePicker ID="dtpDocStart"   Culture="en-GB"    
                                                    SharedCalendarID="sharedCalendar"  Width="100px"    runat="server"
                                                    CssClass="RadInput_Default">

                                                                <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">

                                                                               <SpecialDays>
                                                                                  <telerik:RadCalendarDay Repeatable="Today" >
                                                                                     <ItemStyle BackColor="Pink" />
                                                                                  </telerik:RadCalendarDay>                
                                                                               </SpecialDays>

                                                                </Calendar>

<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                                                </telerik:RadDatePicker>



0
Accepted
Shinu
Top achievements
Rank 1
answered on 19 Nov 2009, 01:03 PM
Hi Lakmal,

Since you are using shared calendar, you have to configure the calendar control in order to take the changes in effect.

ASPX:
 
 
 
 <telerik:RadDatePicker ID="dtpDocStart" Culture="en-GB" SharedCalendarID="sharedCalendar" 
        Width="100px" runat="server" CssClass="RadInput_Default"
        <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"
        </Calendar> 
    </telerik:RadDatePicker> 
 
    <telerik:RadCalendar ID="sharedCalendar" runat="server" EnableMultiSelect="false" RangeMinDate="2006/01/01"
        <SpecialDays> 
            <telerik:RadCalendarDay Repeatable="Today"
                <ItemStyle BackColor="Pink" /> 
            </telerik:RadCalendarDay> 
        </SpecialDays> 
    </telerik:RadCalendar> 

-Shinu.
Asked by
lakmal
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
lakmal
Top achievements
Rank 2
Share this question
or