Articles in this section
Category / Section

How to Customize the Leading and Trailing Dates of Month Cells in the .NET MAUI Calendar (SfCalendar)?

1 min read

In the Syncfusion .NET MAUI Calendar control, customize the leading and trailing dates of the SfCalendar month cell.

 

Change the leading and trailing dates background using the TrailingLeadingDatesBackground property of the CalendarMonthView, as shown in the following code sample.

 

XAML

<calendar:SfCalendar x:Name="calendar">
    <calendar:SfCalendar.MonthView>
        <calendar:CalendarMonthView TrailingLeadingDatesBackground="#FEB8B8">
        </calendar:CalendarMonthView>
    </calendar:SfCalendar.MonthView>
</calendar:SfCalendar>

 

Style the leading and trailing dates text using the TrailingLeadingDatesTextStyle‘s CalendarTextStyle properties such as TextColor, FontSize, FontFamily, and FontAttributes, as shown in the following code sample.

 

XAML

<calendar:CalendarMonthView.TrailingLeadingDatesTextStyle>
    <calendar:CalendarTextStyle TextColor="#FFFFFF"
                                FontSize="15"
                                FontAttributes="Bold,Italic" />
</calendar:CalendarMonthView.TrailingLeadingDatesTextStyle>

 

View sample on GitHub

 

Output:

 

Leading and Trailing dates customization using Syncfusion .NET MAUI Calendar

 

Conclusion

 

I hope you enjoyed learning how to customize the leading and trailing dates of the month cells in the .NET MAUI Calendar (SfCalendar).

Refer to our .NET MAUI Calendar’s feature tour page to learn about its other groundbreaking feature representations. You can explore our .NET MAUI Calendar documentation to understand how to present and manipulate data.

For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion, try our 30-day free trial to check out our .NET MAUI Calendar and other .NET MAUI components.

Please let us know in the comments section below if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied