Articles in this section
Category / Section

How to restrict the visibility of the days in WPF CalendarEdit?

2 mins read

In the WPF CalendarEdit control, dates of the next and previous months are shown by default. You can restrict the visibility of the days of the previous months or the next month by using the ShowNextMonthDays and ShowPreviousMonthDays Boolean properties, respectively. By disabling these properties, the corresponding dates are not displayed.

The following code example shows how to disable the visibility of the days of the previous or the next month and to show only current month’s dates.  

XAML

<syncfusion:CalendarEdit x:Name="_calendar" ShowNextMonthDays="False" ShowPreviousMonthDays="False"></syncfusion:CalendarEdit>

C#

_calendar.ShowNextMonthDays = false;
_calendar.ShowPreviousMonthDays = false;

 

Screenshot

Figure 1: Dates of the previous and next months are hidden

               

Figure 2: Dates of the previous and next months are displayed


Conclusion

I hope you enjoyed learning about ow to restrict the visibility of the days in CalendarEdit.

You can refer to our  WPF CalendarEditor feature tour page to know about its other groundbreaking feature representations. You can also explore our WPF CalendarEditor documentation to understand how to create and manipulate data.

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

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-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 sign in to leave a comment
Access denied
Access denied