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

Remove blacked out months from being displayed in sfCalendar navigation

Thread ID:





147084 Aug 31,2019 10:51 AM UTC Sep 2,2019 01:36 PM UTC WinForms 1
Tags: SfCalendar
Asked On August 31, 2019 10:51 AM UTC

I am wondering if it is possible to configure or subclass sfCalendar for the following use case:

A registration system needs to accept Q1 (Jan, Feb, Mar) reservation dates for years 2020 through 2025.  The months for Q2-Q4 (Apr-Dec) should not be displayed in the control. For example, the 'next' date (shown in the UI) after Mar 31 2020 should be Jan 01 2021.

Is there a way to hide or no-display the dates in Q2-Q4 ?

Kanniyappan Panneer Selvam [Syncfusion]
Replied On September 2, 2019 01:36 PM UTC

Hi Richard, 
Thanks for contacting Syncfusion support. 
We have checked your query “Remove blacked out months from being displayed in sfCalendar navigation” at our end. We have prepared the sample based on your requirement. In our sample, we have handled the blackout month range between April to December from SfCalendar navigation using Navigating event and navigated SfCalendar date to next year January using GotoDate method. Please find the code snippet and sample for the same. 
Code Snippet: 
if (e.NewValue.Start >= new DateTime(year, 04, 01) && e.NewValue.End <= new DateTime(year, 12, 31)) 
                e.Cancel = true;                 
                this.sfCalendar1.GoToDate(new DateTime(year, 1, 1)); 
If we misunderstood your requirement, please provide more information regarding the requirement, it would be more helpful to proceed further.  
Kanniyappan P 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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
Live Chat Icon