We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Workweekview ios + how to bind multiple days to the NoneWorkingDays property

Hey all,

I am currently using the syncfusion scheduler and it does seem to fit our needs. But on iOS it does display sat and sunday which it isn't supposed to do. I seem to have fixed this by just setting the NoneWorkingDays property, but I want to set both day "1" and day "6" (saturday and sunday).

This is the XAML I got right now that removes saturday. 

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             Title="Business Navigator"  >
  <schedule:SfSchedule x:Name="Schedule"
                       BackgroundColor="White" FirstDayOfWeek="2" >
    <schedule:SfSchedule.WorkWeekViewSettings >
      <schedule:WorkWeekViewSettings NonWorkingsDays="6">      <---(help)
        <schedule:WorkWeekViewSettings.WorkWeekLabelSettings  >
          <schedule:WorkWeekLabelSettings TimeFormat="HH:mm" />

This component does seem to work correctly on Android when displayed in WorkWeekview, but on iOS this workaround is needed.

6 Replies

LU Luuk September 27, 2016 10:28 AM UTC


To elaborate on the issue:

The issue is fixed when I don't set the TimeFormat of the WorkWeekView.. This seem to be a bug and really strange behavior. I do need the 24 hour notation, so I hope this bug will be adressed and fixed asap

LU Luuk September 27, 2016 10:29 AM UTC

<Grid x:Name="grid_layout">

      x:Name="Schedule" ScheduleView="WorkWeekView"

(This part breaks the schedule workview )
        <schedule:WorkWeekViewSettings >
            <schedule:WorkWeekLabelSettings TimeFormat="HH:mm"></schedule:WorkWeekLabelSettings>


SG Swathi Gopal Syncfusion Team September 27, 2016 12:09 PM UTC

Hi Luuk, 
Thanks for your interest in Syncfusion products. 
We would like to let you know that we are able to reproduce the issue in the mentioned scenario and currently we are analyzing on your requirement, we will update you the details within two business days (Sep 29, 2016). We appreciate your patience until then.

As a workaround for the above mentioned issue you have used NonWorkingDays property of Schedule, where your requirement can be achieved by using the below code  
ObservableCollection<System.DayOfWeek> NonWorkingDays = new ObservableCollection<System.DayOfWeek>();      

            WorkWeekViewSettings workWeekViewSettings = new WorkWeekViewSettings();
            WorkWeekLabelSettings workWeekLabelSettings = new WorkWeekLabelSettings();
            workWeekLabelSettings.TimeFormat = "HH:mm";
            workWeekViewSettings.NonWorkingsDays = NonWorkingDays;
            workWeekViewSettings.WorkWeekLabelSettings = workWeekLabelSettings;
            Schedule.WorkWeekViewSettings = workWeekViewSettings;
Please let us know, if you have any concerns.  

Swathi G 

LU Luuk September 27, 2016 12:44 PM UTC


Thank you for the quick reply, I am happy that it's indeed a bug and not something I did wrong.

I did find a workaround by writing in the code behind:


  if (Device.OS == TargetPlatform.iOS)

Also the following XAML seem to work:

            <OnPlatform x:TypeArguments="x:DayOfWeek" iOS="Sunday">
            <OnPlatform x:TypeArguments="x:DayOfWeek" iOS="Saturday">


The XAML above will be a workaround that only works for iOS, since Android somehow will remove both friday and thursday when applied... Even though I am using the Onplatform with only iOS.

LU Luuk September 27, 2016 12:46 PM UTC

Android in general does not seem to like using the enum names like friday etc. It does work when using the flags given to it for example monday = 1 so you write 1 instead of monday.

SP Subburaj Pandian Veluchamy Syncfusion Team September 29, 2016 10:38 AM UTC

Hi Luuk,

We are happy that provided workaround has resolved the mentioned issue. We have created a new support incident under your account to track the status of this issue. Please log on to our support website to check for further updates.


Please let us know, if you have any query.

Subburaj Pandian V.

Live Chat Icon For mobile
Up arrow icon