How do I change which timespan the day view is showing when it is opened?
I would like it to scroll to the current time when opened, instead of staying at the minimum time for that day.
Also, has anyone implemented a line showing the current time?
9 Answers, 1 is accepted
With the current implementation of the Xamarin.Forms Calendar, the desired functionalities are not supported out of the box. We have a feature request logged for controlling the first time slot shown - Calendar: Add functionality to scroll to the first available event when in mode. I have increased its priority as per your request. Please follow the item in order to subscribe for automatic notifications.
In the meantime, you can partially achieve the desired behavior by creating custom renderers and utilizing the native controls. For example, in iOS:
I have attached a sample for your reference.
Hello Stefan, thanks for the reply.
Your suggestion solves how many hours is visible, thank you for that.
What I am more interested in is how to scroll to the current time when the calendar is opened.
Even better would be an option to show a line with the current time as well.
Is this possible?
Unfortunately, these functionalities are not available. I have added your requirement to the feature request so we can consider implementing them as well.
Indeed, it seems more intuitive to set the starting time to a more convenient time in the morning considering the business hours. We have logged the task at our end and will consider implementing it at some point. Here is the public item which you can track - Calendar: Change default time period. I have added some points to your account for the suggestion. You can follow the item in order to subscribe for automatic notifications.
Another year has past. Is there any way to get the iOS Calendar in Xamarin.Forms to scroll to an appointment or at least to DateTime.Now ?
When the view changes, find the earliest appointment, then set the Calendar's DayStartTime to an hour or so before that appointment This will make it look like the calendar scrolled and since there are no earlier appointments, nothing is hidden:
Yeah, that works great. Until the user slides to the next day (or more) and the calendar jumps up and down depending on where the appointments are. Or until you come to a day with the first appointment at 3PM and you want to add an appointment at 10AM.
Seriously, I can't belive this is not implemented yet.
I agree scrolling the view to a specific appointment / time is important functionality and we will definitely look into ways to implement it soon.
I am sorry for the caused inconvenience due to the missing feature in RadCalendar control.