This is a migrated thread and some comments may be shown as answers.

How to recognize the day the user clicked?

4 Answers 53 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
niv kfir
Top achievements
Rank 1
niv kfir asked on 20 May 2010, 12:06 PM
Hi,
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: 

PresentationType

 

="Preview"

 

 

 

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?
Niv.



     

4 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 20 May 2010, 01:12 PM
Hello,

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

Regards,
Princy.
0
niv kfir
Top achievements
Rank 1
answered on 21 May 2010, 12:51 PM
Hi.
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.

Thanks,
Niv.

0
Jonas Sarunas
Top achievements
Rank 2
answered on 29 Jul 2010, 02:17 PM
Hi,

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

Jonas
0
Maria Ilieva
Telerik team
answered on 02 Aug 2010, 01:51 PM
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
Tags
Calendar
Asked by
niv kfir
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
niv kfir
Top achievements
Rank 1
Jonas Sarunas
Top achievements
Rank 2
Maria Ilieva
Telerik team
Share this question
or