Change the color of a day

Hi, my situation is after users select two dates, I want to disable the selection of the date again. I am able to set IsEnabled = false but not able to change the color of the day. May I know any method that I can use to change the color of the day after the first load of the calendar?



1 Reply

SS SaiGanesh Sakthivel Syncfusion Team April 27, 2022 01:32 PM UTC

Hi Choy,


#Regarding Changing the selecteddate color in SfCalendar

Your requirement can be achieved with the help of MonthViewSettings in SfCalendar. Please refer to the following code snippet for your reference.


Code Snippet

<syncfusion:SfCalendar x:Name="calendar">

            <syncfusion:SfCalendar.MonthViewSettings>

<syncfusion:MonthViewSettings

                          DateSelectionColor="#ffffff"

                        SelectedDayTextColor="#000000"

                          TodaySelectionTextColor="Black"

                        TodaySelectionBackgroundColor="Green">

                        </syncfusion:MonthViewSettings>

   </syncfusion:SfCalendar.MonthViewSettings>

</syncfusion:SfCalendar>


Please refer to the following UG documentation for your reference.

UG: https://help.syncfusion.com/xamarin/calendar/display-modes#month-view-customization


Please let us know if you have any concerns.


Regards,
SaiGanesh Sakthivel


Loader.
Up arrow icon