NavigateToDate() not working as expected

8 posts, 1 answers
  1. Martin
    Martin avatar
    14 posts
    Member since:
    Jan 2008

    Posted 30 Jan 2015 Link to this post

    When I trigger Calendar.NavigateToDate() with today's date, it doesn't work. In fact, I have to add two days to today's date, then it navigates (to today+2).

    E.g.:
    DOESN'T NAVIGATE: 2015-01-30 08:26:50 +0000     [today]
    DOESN'T NAVIGATE: 2015-01-31 08:30:13 +0000     [today + 1]
    DOES NAVIGATE: 2015-02-01 08:31:24 +0000          [today + 2]

    (neither the overridden WillNavigateToDate() nor DidNavigateToDate() in the calendar's TKCalendarDelegate are hit with the first two dates; they are with the last date).

    Thanks

    Martin
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 30 Jan 2015 Link to this post

    Hi Martin,

    That's strange. I was not able to reproduce the described issue with my tests. Please, could you send us your code and we will investigate this issue further.

    Looking forward to your reply.

    Regards,
    Jack
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Martin
    Martin avatar
    14 posts
    Member since:
    Jan 2008

    Posted 31 Jan 2015 in reply to Jack Link to this post

    Hi Jack

    Please send me your bitbucket account name and I will share the repo with you.
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 02 Feb 2015 Link to this post

    Hello Martin,

    We usually use our own ticketing system to receive code snippets/projects and we do not use external services like bitbucket. Therefore, I would kindly ask you to use the code snippet tool from the message editor to share a snippet of the code that you use to work with TKCalendar. This will allow us to assist you further. Thank you for your understanding.

    Regards,
    Jack
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Martin
    Martin avatar
    14 posts
    Member since:
    Jan 2008

    Posted 02 Feb 2015 in reply to Jack Link to this post

    Hi Jack

    Here is where I add the button that navigates to Today:

    var todayButton = new UIBarButtonItem ("Today", UIBarButtonItemStyle.Plain, (s, e) => {
        var today = NSDate.Now;
        Calendar.NavigateToDate (today, true);
    });
    NavigationItem.SetRightBarButtonItem(todayButton, false);

    It doesn't work.
  7. Answer
    Jack
    Admin
    Jack avatar
    2335 posts

    Posted 04 Feb 2015 Link to this post

    Hi Martin,

    I am still not able to reproduce the issue and I will need more code. Could you please send me also the code responsible for initialising TKCalendar?r

    Thank you in advance.

    Regards,
    Jack
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Martin
    Martin avatar
    14 posts
    Member since:
    Jan 2008

    Posted 05 Feb 2015 in reply to Jack Link to this post

    Hi Jack

    My apologies, this is actually a misunderstanding on my part as to what NavigateToDate() does: I thought it sets the date, whereas in fact it just positions the calendar (and doesn't actually select the date). That is why it "worked" with the dates I mentioned above: when it went over to the next month, it did indeed navigate.

    Thanks for looking into this, apologies again for the misunderstanding.
  9. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 06 Feb 2015 Link to this post

    Hi Martin,

    Thank you for this update. I am glad to hear that the issue is solved now. Do not hesitate to contact us if you have other questions.

    Regards,
    Jack
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner