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

DateSelect event?

4 Answers 42 Views
Calendar & Scheduling
This is a migrated thread and some comments may be shown as answers.
Mihail
Top achievements
Rank 1
Mihail asked on 23 Apr 2015, 06:08 PM
Hello,

I am using Telerik for Xamarin Calendar to build iOS application. Everything is fine until I try to catch some event of date selecting. I saw that there are 3 event handlers: ViewChanged, DisplayDateChanged and SelectionChanged. 
What I need is every time when I click on a date (no matter if the date is the current date or the last selected date or whatever) to raise some dateclick event. The closest thing to this is SelectionChanged but it does not work on the same selection (as the name says). Is there such an event and if not, do you plan to implement it, because it is really annoying to add some flags in order to make basic functionality work...

Regards,
Mihail

4 Answers, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 27 Apr 2015, 11:53 AM
Hi Mihail,

Thank you for contacting us.

At this moment such functionality is not supported, but I have logged your request in our Ideas and Feedback portal where you and our community can vote for it and raise its priority.

Please, let us know if you have any other questions.

Regards,
Rosy Topchiyska
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Fabio
Top achievements
Rank 1
answered on 02 May 2015, 05:57 AM
Is there a way we can interact or do a work around of this event?
0
Mihail
Top achievements
Rank 1
answered on 04 May 2015, 06:56 AM

Fabio,

I personally managed to make a kind of dirty hack for iOS. If you choose to implement this workaround, you will lose the current date selected circle. The basic idea is on every selection (in the SelectionChanged event), I move the current date to some date far away from the past, in my case: 01.01.2000 - this date should be some date that you are sure the users will not click on. This causes the SelectionChanged event to be invoked again, but I stop it with a check from a boolean flag. Here is a sample implementation:

if (!dateChangedFlag)
            {
                var calendar = (RadCalendar)sender;
                dateChangedFlag = true;
                NavigateToPlanningItemDispatcherPage((DateTime)e.NewValue);
                calendar.SelectedDate = new DateTime(2000, 1, 1);
            }
            else
            {
                dateChangedFlag = false;
            }

It is not perfect, but it does the job.

Hope this helps,
Mihail

0
Fabio
Top achievements
Rank 1
answered on 04 May 2015, 07:54 AM
Thanks Mihail I will give it a try.
Tags
Calendar & Scheduling
Asked by
Mihail
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Fabio
Top achievements
Rank 1
Mihail
Top achievements
Rank 1
Share this question
or