DateSelect event?

5 posts, 0 answers
  1. Mihail
    Mihail avatar
    6 posts
    Member since:
    Feb 2015

    Posted 23 Apr 2015 Link to this post

    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
  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    550 posts

    Posted 27 Apr 2015 Link to this post

    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.

     
  3. DevCraft banner
  4. Fabio
    Fabio avatar
    20 posts
    Member since:
    Apr 2015

    Posted 02 May 2015 Link to this post

    Is there a way we can interact or do a work around of this event?
  5. Mihail
    Mihail avatar
    6 posts
    Member since:
    Feb 2015

    Posted 04 May 2015 in reply to Fabio Link to this post

    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

  6. Fabio
    Fabio avatar
    20 posts
    Member since:
    Apr 2015

    Posted 04 May 2015 in reply to Mihail Link to this post

    Thanks Mihail I will give it a try.
Back to Top
DevCraft banner