Setting server system date as current date to a RAD:DatePicker

2 posts, 1 answers
  1. kumar S
    kumar S avatar
    7 posts
    Member since:
    Aug 2012

    Posted 09 Dec 2009 Link to this post


        I want to show "Server machine" system date as "Current Date" in a "RAD:DatePicker". Suppose "Server System" date is "23/12/2009". and "Client System" date is "22/12/2009" then I want to high light "23/12/2009" as current date, When DatePicker Popup is opened. Following is code  snippet setting style to high light "Today's date in picker.

                                        <telerik:RadCalendarDay Repeatable="Today" Date="" ItemStyle-CssClass="rcToday" />

    Thanks in Advance,
  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Dec 2009 Link to this post

    Hello Kumar,

    You can set today's date from code behind as shown below.

        protected void RadDatePicker6_Load(object sender, EventArgs e) 
            RadDatePicker6.SelectedDate = DateTime.Now.Date;  
            // Code for adding special daya from code behind 
            //RadCalendarDay cDay = new RadCalendarDay(); 
            //cDay.Date = DateTime.Now.Date; 
            //cDay.ItemStyle.CssClass = "rcToday"; 

Back to Top