Get clicked date

3 posts, 0 answers
  1. Per
    Per avatar
    1 posts
    Member since:
    Jun 2010

    Posted 02 Mar 2012 Link to this post


    I need to get the clicked date in the RadCalendar, regardless if it was selected or deselected. I know you can do is on the clientside, but I need to to this serverside.

    I'v tried with the method RadCalendar_SelectionChanged, but then I only get an array of selected dates, not any information about the last date that triggered the event handler.

    Is this possible?

    Best regards,
  2. Pavlina
    Pavlina avatar
    6165 posts

    Posted 07 Mar 2012 Link to this post


    You can examine the code snippet below in order to retrieve the last selected date :
    protected void RadCalendar1_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e)
        if (e.SelectedDates.Count != 0)
            Response.Write(e.SelectedDates[e.SelectedDates.Count - 1].Date.ToString()); // Last selected date
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Stephanie
    Stephanie avatar
    153 posts
    Member since:
    Aug 2013

    Posted 11 Sep 2015 in reply to Pavlina Link to this post

    Is there a way to get the actual clicked date? I am having issues because when someone clicks a date I want to select the dates for a specific range which works fine, but if the client then clicks on that date again the last selected date is the last of the initial range I programatically selected vs what is actually selected.

    I just really need to format these dates differently so the client knows how long of a service they are booking. I am already using special dates to block off closed days/holidays so how can I just format them differently if not using the selected dates?

Back to Top