MonthCalendarExtenestions
Wisej.Web.Markup.MonthCalendarExtenestions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the MonthCalendar class.
public class MonthCalendarExtenestions
Methods
AnnuallyBoldedDates<TMonthCalendar>(monthCalendar, dates)

Sets the AnnuallyBoldedDates property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated AnnuallyBoldedDates property.
This method allows you to specify dates that are bolded every year in the month calendar.
myMonthCalendar.AnnuallyBoldedDates(new DateTime(2000, 1, 1), new DateTime(2000, 12, 25));
BoldedDates<TMonthCalendar>(monthCalendar, dates)

Sets the BoldedDates property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated BoldedDates property.
This method allows you to specify specific dates that are bolded in the month calendar.
myMonthCalendar.BoldedDates(new DateTime(2023, 6, 1), new DateTime(2023, 7, 4));
BorderStyle<TMonthCalendar>(monthCalendar, borderStyle)

Sets the BorderStyle property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated BorderStyle property.
This method allows you to set the border style for the month calendar.
myMonthCalendar.BorderStyle(BorderStyle.FixedSingle);
CalendarDimensions<TMonthCalendar>(monthCalendar, dimensions)

Sets the CalendarDimensions property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated CalendarDimensions property.
This method allows you to specify the dimensions (number of months shown) for the month calendar.
myMonthCalendar.CalendarDimensions(new Size(2, 1));
FirstDayOfWeek<TMonthCalendar>(monthCalendar, day)

Sets the FirstDayOfWeek property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated FirstDayOfWeek property.
This method allows you to specify the first day of the week for the month calendar.
myMonthCalendar.FirstDayOfWeek(Day.Monday);
MaxDate<TMonthCalendar>(monthCalendar, date)

Sets the MaxDate property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated MaxDate property.
This method allows you to set the maximum allowable date that can be selected in the month calendar.
myMonthCalendar.MaxDate(new DateTime(2023, 12, 31));
MaxSelectionCount<TMonthCalendar>(monthCalendar, count)

Sets the MaxSelectionCount property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated MaxSelectionCount property.
This method allows you to specify the maximum number of days that can be selected in the month calendar.
myMonthCalendar.MaxSelectionCount(7);
MinDate<TMonthCalendar>(monthCalendar, date)

Sets the MinDate property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated MinDate property.
This method allows you to set the minimum allowable date that can be selected in the month calendar.
myMonthCalendar.MinDate(new DateTime(2023, 1, 1));
MonthlyBoldedDates<TMonthCalendar>(monthCalendar, dates)

Sets the MonthlyBoldedDates property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated MonthlyBoldedDates property.
This method allows you to specify dates that are bolded every month in the month calendar.
myMonthCalendar.MonthlyBoldedDates(new DateTime(2000, 1, 15));
OnDateChanged<TMonthCalendar>(monthCalendar, action)

Attaches an event handler for the DateChanged event of the specified MonthCalendar.
action
An action to execute when the selected date range changes.
Returns: TMonthCalendar. The modified month calendar with the attached DateChanged event handler.
This method allows you to execute a custom action whenever the selected date range changes in the month calendar.
myMonthCalendar.OnDateChanged((mc, args) =>
{
AlertBox.Show($"Date changed: {args.Start} - {args.End}");
});
OnDateSelected<TMonthCalendar>(monthCalendar, action)

Attaches an event handler for the DateSelected event of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the attached DateSelected event handler.
This method allows you to execute a custom action whenever a date is selected in the month calendar.
myMonthCalendar.OnDateSelected((mc, args) =>
{
AlertBox.Show($"Date selected: {args.Start} - {args.End}");
});
OnDisplayRangeChanged<TMonthCalendar>(monthCalendar, action)

Attaches an event handler for the DisplayRangeChanged event of the specified MonthCalendar.
action
An action to execute when the display range changes.
Returns: TMonthCalendar. The modified month calendar with the attached DisplayRangeChanged event handler.
This method allows you to execute a custom action whenever the display range changes in the month calendar.
myMonthCalendar.OnDisplayRangeChanged((mc, args) =>
{
AlertBox.Show($"Display range changed: {args.Start} - {args.End}");
});
SelectionEnd<TMonthCalendar>(monthCalendar, date)

Sets the SelectionEnd property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated SelectionEnd property.
This method allows you to specify the end date of the selection range in the month calendar.
myMonthCalendar.SelectionEnd(new DateTime(2023, 6, 10));
SelectionRange<TMonthCalendar>(monthCalendar, selectionRange)

Sets the SelectionRange property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated SelectionRange property.
This method allows you to specify the selection range in the month calendar.
myMonthCalendar.SelectionRange(new SelectionRange(new DateTime(2023, 6, 1), new DateTime(2023, 6, 10)));
SelectionStart<TMonthCalendar>(monthCalendar, date)

Sets the SelectionStart property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated SelectionStart property.
This method allows you to specify the start date of the selection range in the month calendar.
myMonthCalendar.SelectionStart(new DateTime(2023, 6, 1));
ShowOtherMonth<TMonthCalendar>(monthCalendar, value)

Sets the ShowOtherMonth property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated ShowOtherMonth property.
This method allows you to enable or disable the display of days from other months in the month calendar.
myMonthCalendar.ShowOtherMonth(true);
ShowToday<TMonthCalendar>(monthCalendar, value)

Sets the ShowToday property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated ShowToday property.
This method allows you to enable or disable the display of today's date at the bottom of the month calendar.
myMonthCalendar.ShowToday(true);
ShowToolTips<TMonthCalendar>(monthCalendar, value)

Sets the ShowToolTips property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated ShowToolTips property.
This method allows you to enable or disable the display of tooltips in the month calendar.
myMonthCalendar.ShowToolTips(true);
ShowWeekNumbers<TMonthCalendar>(monthCalendar, value)

Sets the ShowWeekNumbers property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated ShowWeekNumbers property.
This method allows you to enable or disable the display of week numbers in the month calendar.
myMonthCalendar.ShowWeekNumbers(true);
TodayDate<TMonthCalendar>(monthCalendar, date)

Sets the TodayDate property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated TodayDate property.
This method allows you to specify the date to be used as today's date in the month calendar.
myMonthCalendar.TodayDate(new DateTime(2023, 6, 15));
TodayFormat<TMonthCalendar>(monthCalendar, format)

Sets the TodayFormat property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated TodayFormat property.
This method allows you to specify the format string for displaying today's date in the month calendar.
myMonthCalendar.TodayFormat("MM/dd/yyyy");
Tools<TMonthCalendar>(monthCalendar, tools)

Adds the specified tools to the Tools collection of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the added tools.
This method allows you to add multiple tools to the month calendar in one call.
myMonthCalendar.Tools(tool1, tool2, tool3);
ToolsPosition<TMonthCalendar>(monthCalendar, position)

Sets the ToolsPosition property of the specified MonthCalendar.
Returns: TMonthCalendar. The modified month calendar with the updated ToolsPosition property.
This method allows you to specify the position of tools in the month calendar.
myMonthCalendar.ToolsPosition(HeaderPosition.Top);
Last updated
Was this helpful?