SfCalendar MonthViewSettings.DisabledBackgroundColor is not working on Xamarin.Android

As the subject says, the DisabledBackgroundColor has no affect in Xamarin.Android.  It works fine in Xamarin.iOS.  Here is the Android code I am testing with and attached are screenshots from Android (not working) and iOS (Working).

using Android.App;
using Android.OS;
using System;
using Com.Syncfusion.Calendar;

namespace calendarandroid
{
    [Activity(Label = "calendarandroid"MainLauncher = trueIcon = "@mipmap/icon")]
    public class MainActivity : Activity
    {
        CalendarEventCollection eventsCollection = new CalendarEventCollection();
        SfCalendar calendar;
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            calendar = new SfCalendar(this);
            var startDate = DateTime.Today.AddDays(-5);
            var endDate = DateTime.Today.AddDays(30);

            calendar.ViewMode = Com.Syncfusion.Calendar.Enums.ViewMode.MonthView;
            calendar.MinDate = DateTimeToOSDate(startDate);
            calendar.MaxDate = DateTimeToOSDate(endDate);

            MonthViewSettings monthViewSettings = new MonthViewSettings
            {
                TodayTextColor = Android.Graphics.Color.Red,
                WeekEndTextColor = Android.Graphics.Color.ParseColor("#0990E9"),
                DisabledTextColor = Android.Graphics.Color.Green,
                DisabledBackgroundColor = Android.Graphics.Color.Gray
            };

            calendar.MonthViewSettings = monthViewSettings;

            SetContentView(calendar);
        }

        public Java.Util.Calendar DateTimeToOSDate(DateTime dateTime)
        {
            var javaCalendar = Java.Util.Calendar.Instance;
            javaCalendar.Set(dateTime.YeardateTime.Month - 1dateTime.DaydateTime.HourdateTime.MinutedateTime.Second);

            return javaCalendar;
        }
    }
}
  


Attachment: Archive_133a88cb.zip

3 Replies

VA Vinnalan Aravazhi Syncfusion Team February 22, 2018 10:34 AM UTC

Hi Brian,

Thanks for contacting Syncfusion support.

We have checked the reported issue "DisabledBackgroundColor is not working on Xamarin.Android" from our side and we are unable to reproduce the reported issue from our side. Please find the sample from the below link.

Sample: http://www.syncfusion.com/downloads/support/forum/136043/ze/DisabledBackgroundColorDroid795615066 

Please let us know if you have any other queries.

Regards,
Vinnalan K A. 



BM Brian McCarty February 22, 2018 03:16 PM UTC

Thank you.  It looks like version 16.1.0.24 fixed it.


VA Vinnalan Aravazhi Syncfusion Team February 23, 2018 06:29 AM UTC

Hi Brian,

Thanks for the update.

We are glad to know that you have achieved your requirement and please let us know if you have any other queries.

Regards,
Vinnalan K A.

Loader.
Up arrow icon