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

NavigateToDate() not working as expected

7 Answers 47 Views
Calendar - Xamarin.iOS
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 30 Jan 2015, 08:36 AM
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

7 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 30 Jan 2015, 04:59 PM
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.

 
0
Martin
Top achievements
Rank 1
answered on 31 Jan 2015, 08:50 AM
Hi Jack

Please send me your bitbucket account name and I will share the repo with you.
0
Jack
Telerik team
answered on 02 Feb 2015, 08:23 AM
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.

 
0
Martin
Top achievements
Rank 1
answered on 02 Feb 2015, 10:23 AM
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.
0
Accepted
Jack
Telerik team
answered on 04 Feb 2015, 05:23 PM
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.

 
0
Martin
Top achievements
Rank 1
answered on 05 Feb 2015, 04:21 PM
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.
0
Jack
Telerik team
answered on 06 Feb 2015, 05:07 PM
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.

 
Tags
Calendar - Xamarin.iOS
Asked by
Martin
Top achievements
Rank 1
Answers by
Jack
Telerik team
Martin
Top achievements
Rank 1
Share this question
or