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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the appearance of dates in the WinForms MonthCalenderAdv?

Platform: WinForms |
Control: MonthCalendarAdv

Appearance and selection of date cell

The appearance and selection of a Date cell can be customized in the MonthCalenderAdv by handling the DateQueryCellInfo event. The following code example demonstrates the same.


private void monthCalendarAdv1_DateCellQueryInfo(object sender, Syncfusion.Windows.Forms.Tools.DateCellQueryInfoEventArgs e)
   //Helps customize the MonthCalenderAdv DateCells.
   if (e.RowIndex == 3 && e.ColIndex > 2)
      e.Style.BackColor = Color.Snow;
      //Disables Date cell selection.
      e.Style.Enabled = false;
      //Sets Unselectable Date cells BackColor.
      e.Style.BackColor = Color.FromArgb(13, 134, 64);



Private Sub monthCalendarAdv1_DateCellQueryInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Tools.DateCellQueryInfoEventArgs) Handles monthCalendarAdv1.DateCellQueryInfo
    'Helps customize the MonthCalenderAdv DateCells.
    If e.RowIndex = 3 AndAlso e.ColIndex > 2 Then
      e.Style.BackColor = Color.Snow
      'Disables Date cell selection.
      e.Style.Enabled = False
      'Sets Unselectable Date cells BackColor.
      e.Style.BackColor = Color.FromArgb(13, 134, 64)
    End If
End Sub

Customize the monthCalendarAdv

Figure 1: Customized MonthCalenderAdv

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/DisableDateInMonthCalenderAdv-382923870.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile