FirstDayOfWeek property has no effect in TimelineView

Hi team,

I am trying to get a weekly timeline view working with SfSchedule, but unable to make the view start on a Monday.

What I want to achieve is a 5 day view, Monday to Friday, with the timeline starting on Monday, even if the current day is later in the week.

So far I have tried several combinations of DaysCount and NonWorkingDays in TimelineViewSettings, along with the FirstDayOfWeek property on SfSchedule.  It doesn't matter what values I use, the timeline always starts on the current day.

The documentation (here) mentions that:
"In Timeline view, FirstDayOfWeek will be applied only when DayCounts property of TimelineViewSettings is 7."
This is confusing, since setting the DaysCount property to 7 seems to make no difference, and I would like to be able to specify a FirstDayOfWeek for a timeline of any amount of days.

Please see the attached zip file that contains a modified version of your sample, along with two screenshots.  I am testing with the UWP app.
  • TimelineViewActual.png - what is actually displayed
  • TimelineViewDesired.png - how I would like the view to display
Is there any way to force the timeline view to start on Monday?  Being able to do this would also mean that tapping the left and right icons to move to the next time period would display the next week, starting from Monday, which is what I want to achieve.

Kind regards,
James

Attachment: TimelineView_8c045764.zipx

9 Replies

SS SaiGanesh Sakthivel Syncfusion Team April 20, 2020 12:37 PM UTC

Hi James,  
  
Thank you for contacting Syncfusion support.  
  
Currently we are analyzing your query FirstDayOfWeek property has no effect in TimelineView and we will update you further details on or before April 22, 2020. We appreciate your patience until then.  
  
Regards,   
SaiGanesh Sakthivel


SS SaiGanesh Sakthivel Syncfusion Team April 22, 2020 02:11 PM UTC

Hi James,  
  
Thank you for the patience.  
  
Regarding FirstDayOfWeek property in Timeline View 
We would like to inform that, as per the behaviour of SfSchedule you cannnot achieved you requirement by directly using FirstDayofWeek property in Timeline View but you can achieved your requirement by calculating the first Day of week using custom method and set to MoveToDate property in SfSchedule. It will work only for Day Count is 7 and Day count is 5 when nonworkings day is set. Please refer to the following code snippet for your reference. 
 
CodeSnippet 
public MainPage() 
{ 
    InitializeComponent(); 
    Schedule.MoveToDate = this.FindFirstDateofWeek();     
} 
private DateTime FindFirstDateofWeek() 
{ 
    var currentDay = (int)DateTime.Now.DayOfWeek; 
    var firstDateofweek = DateTime.Now.Date.AddDays(-currentDay); 
    return firstDateofweek.AddDays((int)Schedule.FirstDayOfWeek); 
} 
 
Please refer to the following workaround sample in the link. 
 
We hope this helps. Please let us know if you need any further assistance.  
 
Regards,  
SaiGanesh Sakthivel


JC James Cecil April 22, 2020 03:35 PM UTC

Thanks for your advice SaiGanesh, that pointed me in the right direction.

I am using MVVM so instead of adding to the code behind I bound the MoveToDate property in XAML to a property in my view model, and have achieved the behavior I wanted.

Kind regards,
James


JC James Cecil April 22, 2020 08:40 PM UTC

Hi SaiGanesh,

After implementing the MoveToDate property I have noticed a new issue with the schedule control sometimes failing to render the bound meetings.

Initially I thought this was due to async loading of data from my web service, but I observed the same behavior with objects created in code.

I was able to reproduce the issue in a sample solution(attached), and found that it appears to be when the mouse pointer moves over the control while the page is being navigated to and rendered.

Steps to reproduce:
  1. Run UWP application in the attached solution.
  2. Click the Open Scheduler button at the bottom of the main screen and quickly move the mouse toward the middle of the page
  3. The schedule control will intermittently fail to display any meetings.
  4. Click the Back button to return to the main page.
  5. Click the Open Scheduler button, but ensure the mouse pointer stays over the button.
  6. The schedule control displays the meetings as soon as the page loads.
When the scheduler fails to render the meetings it is also possible to display them by navigating to the next time period and back again using the built in controls.

Note that this occurs when the MoveToDate property is bound in SchedulePage.xaml.  If you remove the binding the issue no longer occurs.  I don't know if the same would be true when setting the property in the view's code behind as I have not tested this.  

I've also included a couple of screenshots in the zip file showing both results.

Kind regards,
James

Attachment: SchedulerIssues_efa1d423.zipx


SS SaiGanesh Sakthivel Syncfusion Team April 23, 2020 01:55 PM UTC

Hi James,

Thank you for the update.

Currently we are analyzing your query “Failing to render the bound meeting” and we will update you further details on or before April 28, 2020. We appreciate your patience until then.


Regards,
SaiGanesh Sakthivel


SS SaiGanesh Sakthivel Syncfusion Team April 28, 2020 01:16 PM UTC

Hi James,   
   
Thank you for the update.   
   
We have checked and able to replicate the mentioned issue” Failing to render the bound meeting”, we will fix this and include the issue fix in our upcoming Weekly Nuget release which is expected to roll out on May 19th, 2020. We appreciate your patience until then.   
   
Regards,  
SaiGanesh Sakthivel


JC James Cecil May 1, 2020 10:26 AM UTC

Hi SaiGanesh,

Thanks for the update, I look forward to the new release.

Kind regards,
James


MS Muniappan Subramanian Syncfusion Team May 4, 2020 05:37 AM UTC

Hi James Cecil, 
 
Thank you for the update. 
 
As promised, we will fix the mentioned issue and include the issue fix in our upcoming Weekly Nuget release which is expected to roll out on May 19th, 2020. 
 
Regards, 
Muniappan S. 



SS SaiGanesh Sakthivel Syncfusion Team May 19, 2020 03:08 PM UTC

Hi James,  
    
We have fixed the reported issue Failing to render the bound meeting and included the issue fix in our latest Weekly NuGet release update version 18.1.0.53 which is available for download (nuget.org).
  
   
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.    
     
Regards,    
SaiGanesh Sakthivel 


Loader.
Up arrow icon