How to recognize the day the user clicked?

5 posts, 1 answers
  1. niv kfir
    niv kfir avatar
    21 posts
    Member since:
    Apr 2010

    Posted 20 May 2010 Link to this post

    I need to identify the date that the user clicked on, in a calendar.
    (In addition, I would like to allow him/her to click only selected dates)

    The best for me, is to do it on a calendar with: 







    but this doesn't raise any event, as far as I know.

    So, if I work with presentationType = "Interactive", I know how to find a new selected date, but I don't know how to identify the date if the user click on a date that was already selected and now it was thrown out of the SelectedDates collection.
    (I have about 100 selected dates - so looping on the list to find the missing one, on every click - is too much)

    Another option might be using a DatePicker, but then I don't know how to select or change the appearance of dates in the popup calendar so they look selected.

    Any Idea?


  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 20 May 2010 Link to this post


    I hope the following code library on how to disable calendar detes will help you to achieve the functionality.
    Disabling calendar days

  3. niv kfir
    niv kfir avatar
    21 posts
    Member since:
    Apr 2010

    Posted 21 May 2010 Link to this post

    Combination of Princy answer with some major work led to the solution.
    The main point was to disabled the unwanted dates as Princy suggested with a MultiSelect=False.
    Then I was able to get the selected date in the Calendar.SelectedDate property.


  4. Jonas Sarunas
    Jonas Sarunas avatar
    19 posts
    Member since:
    Mar 2008

    Posted 29 Jul 2010 Link to this post


    Still how I can recognize day clicked in code behind?
    I have multiple days selected. And in SelectionChanged event I get last selected day but not that which was clicked.
    Many thanks

  5. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 02 Aug 2010 Link to this post

    Hello Jonas,

    Please refer to the following code library which provides solution for the required scenario.
    I hope this helps.

    Kind regards,
    Maria Ilieva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top