Skip to main content
Version: 4.1

MonthCalendarExtenestions

Namespace: Wisej.Web.Markup

Assembly: Wisej.Framework (4.1.0.0)

Adds fluent markup extension methods to the MonthCalendar class.

public class MonthCalendarExtenestions

Methods

Static member AnnuallyBoldedDates<TMonthCalendar>(monthCalendar, dates)

Sets the AnnuallyBoldedDates property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the AnnuallyBoldedDates property.
datesDateTime[]An array of DateTime representing the annually bolded dates.

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));

Static member BoldedDates<TMonthCalendar>(monthCalendar, dates)

Sets the BoldedDates property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the BoldedDates property.
datesDateTime[]An array of DateTime representing the bolded dates.

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));

Static member BorderStyle<TMonthCalendar>(monthCalendar, borderStyle)

Sets the BorderStyle property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the BorderStyle property.
borderStyleBorderStyleThe BorderStyle to set for the month calendar.

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);

Static member CalendarDimensions<TMonthCalendar>(monthCalendar, dimensions)

Sets the CalendarDimensions property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the CalendarDimensions property.
dimensionsSizeA Size representing the dimensions of the calendar.

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));

Static member FirstDayOfWeek<TMonthCalendar>(monthCalendar, day)

Sets the FirstDayOfWeek property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the FirstDayOfWeek property.
dayDayThe Day to set as the first day of the week.

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);

Static member MaxDate<TMonthCalendar>(monthCalendar, date)

Sets the MaxDate property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the MaxDate property.
dateDateTimeThe maximum allowable date.

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));

Static member MaxSelectionCount<TMonthCalendar>(monthCalendar, count)

Sets the MaxSelectionCount property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the MaxSelectionCount property.
countInt32The maximum number of days that can be selected.

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);

Static member MinDate<TMonthCalendar>(monthCalendar, date)

Sets the MinDate property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the MinDate property.
dateDateTimeThe minimum allowable date.

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));

Static member MonthlyBoldedDates<TMonthCalendar>(monthCalendar, dates)

Sets the MonthlyBoldedDates property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the MonthlyBoldedDates property.
datesDateTime[]An array of DateTime representing the monthly bolded dates.

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));

Static member OnDateChanged<TMonthCalendar>(monthCalendar, action)

Attaches an event handler for the DateChanged event of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar to attach the event handler to.
actionAction<TMonthCalendar, DateRangeEventArgs>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}");
});

Static member OnDateSelected<TMonthCalendar>(monthCalendar, action)

Attaches an event handler for the DateSelected event of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar to attach the event handler to.
actionAction<TMonthCalendar, DateRangeEventArgs>An action to execute when a date is selected.

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}");
});

Static member OnDisplayRangeChanged<TMonthCalendar>(monthCalendar, action)

Attaches an event handler for the DisplayRangeChanged event of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar to attach the event handler to.
actionAction<TMonthCalendar, DateRangeEventArgs>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}");
});

Static member SelectionEnd<TMonthCalendar>(monthCalendar, date)

Sets the SelectionEnd property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the SelectionEnd property.
dateDateTimeThe end date of the selection range.

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));

Static member SelectionRange<TMonthCalendar>(monthCalendar, selectionRange)

Sets the SelectionRange property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the SelectionRange property.
selectionRangeSelectionRangeThe SelectionRange to set for the month calendar.

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)));

Static member SelectionStart<TMonthCalendar>(monthCalendar, date)

Sets the SelectionStart property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the SelectionStart property.
dateDateTimeThe start date of the selection range.

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));

Static member ShowOtherMonth<TMonthCalendar>(monthCalendar, value)

Sets the ShowOtherMonth property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the ShowOtherMonth property.
valueBooleanA boolean indicating whether days from other months are shown in the month calendar.

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);

Static member ShowToday<TMonthCalendar>(monthCalendar, value)

Sets the ShowToday property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the ShowToday property.
valueBooleanA boolean indicating whether today's date is shown at the bottom of the month calendar.

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);

Static member ShowToolTips<TMonthCalendar>(monthCalendar, value)

Sets the ShowToolTips property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the ShowToolTips property.
valueBooleanA boolean indicating whether tooltips are shown in the month calendar.

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);

Static member ShowWeekNumbers<TMonthCalendar>(monthCalendar, value)

Sets the ShowWeekNumbers property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the ShowWeekNumbers property.
valueBooleanA boolean indicating whether week numbers are shown in the month calendar.

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);

Static member TodayDate<TMonthCalendar>(monthCalendar, date)

Sets the TodayDate property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the TodayDate property.
dateDateTimeThe date to use as today's date.

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));

Static member TodayFormat<TMonthCalendar>(monthCalendar, format)

Sets the TodayFormat property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the TodayFormat property.
formatStringThe format string to use for today's date.

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");

Static member Tools<TMonthCalendar>(monthCalendar, tools)

Adds the specified tools to the Tools collection of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar to which the tools should be added.
toolsComponentTool[]An array of tools to add to the month calendar.

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);

Static member ToolsPosition<TMonthCalendar>(monthCalendar, position)

Sets the ToolsPosition property of the specified MonthCalendar.

ParameterTypeDescription
TMonthCalendarThe type of the month calendar, must inherit from MonthCalendar.
monthCalendarTMonthCalendarThe month calendar for which to set the ToolsPosition property.
positionHeaderPositionThe HeaderPosition to set for the tools in the month calendar.

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);