Highlight today date in datpicker

4 posts, 1 answers
  1. lakmal
    lakmal avatar
    76 posts
    Member since:
    Jun 2009

    Posted 13 Nov 2009 Link to this post

    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




  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Nov 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. lakmal
    lakmal avatar
    76 posts
    Member since:
    Jun 2009

    Posted 16 Nov 2009 Link to this post

    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>



  5. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Nov 2009 Link to this post

    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.
Back to Top