Disable Date Selection

2 posts, 0 answers
  1. Mike
    Mike avatar
    20 posts
    Member since:
    Aug 2008

    Posted 03 Dec 2008 Link to this post

    I am using the RadDatePicker. Is there a way to disable a range of dates, say, every date before today's date... so that the user can not select them at all?

    Also i am using a SharedCalendar setup and was wondering if it was possible for one calendar on the page to be able to know what date was selected on another calendar... So to explain further, if i have 2 calendars on a page and i open the first and select a date the open the second to select a second date, is it possible for the first selected date to be showen on the second calendar?

    Thanks,
    Duncan
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Dec 2008 Link to this post

    Hi Duncan,

    The RadDatePicker has MinDate and MaxDate properties that allows to select a date range for the Datepicker. You can set the MinDate property to desired date in order to achieve desired functionality.

    C#:
    protected void Page_Load(object sender, EventArgs e)     
    {     
        if (!IsPostBack)     
        {     
            RadDatePicker1.MinDate = DateTime.Today;     
        }     
    }    
     

    You can check following link to online demo for more information about shared calendar.
    Sharing Calendar

    Thanks,
    Princy.
Back to Top