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
close icon

MonthCalendarExt

Is there anyway to restrict the dates that are selected? For example, I want to make it so that you can only select Mondays on the calendar.


1 Reply

AD Administrator Syncfusion Team April 1, 2009 11:00 AM UTC

Hi Wil Burton ,

Thank you for using Syncfusion products.

Yes you can restrict the dates that are selected. If you want to allow the user to select only Mondays on the calendar, you can set Clickable property to false for other days except Monday using DateCellQueryInfo event handler.

The following code snippet used for this.

[C#]

void monthCalendarAdv1_DateCellQueryInfo(object sender, DateCellQueryInfoEventArgs e)
{
// if not Monday
if (e.ColIndex != 2)
{
e.Style.Clickable = false;
e.Style.Enabled= false;
}
}

Please let me know if this helps you.

Regards,
Jaya



Loader.
Live Chat Icon For mobile
Up arrow icon