New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI Calendar TagHelper CalendarTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-calendar")]
[RestrictChildren("messages", new string[] { "month", "range" })]
public class CalendarTagHelper : CalendarBaseTagHelper, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperBaseCalendarBaseTagHelperCalendarTagHelper

Implements: ITagHelperITagHelperComponent

Inherited Members CalendarBaseTagHelper.VerifySettings()CalendarBaseTagHelper.MonthCalendarBaseTagHelper.DisableDatesHandlerTagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-calendar name="calendar"
                show-other-month-days="false"
                selectable="range"
                allow-reverse="true">
</kendo-calendar>

Constructors

Initializes a new instance of the CalendarTagHelper class.

C#
public CalendarTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

Enables the user to select an end date that is before the start date. This option is available only when the selectable configuration is set to range.

C#
public bool? AllowReverse { get; set; }

Defines the century cell format.

C#
public CenturyCellsFormats? CenturyCellsFormat { get; set; }

Specifies the component type of the widget. "classic" - Uses the standard rendering of the widget. or "modern" - Uses new rendering with a fresh and modern look and feel..

C#
public string ComponentType { get; set; }

Specifies the culture info used by the component. A valid kendo culture file must be added to the page in order for the example to work. <script src="https://cdn.jsdelivr.net/npm/@progress/kendo-ui@{version}/umd/cultures/kendo.culture.de-DE.min.js"&gt;&lt;/script>

C#
public string Culture { get; set; }

Specifies a list of dates, which will be passed to the month template.

C#
public DateTime[] Dates { get; set; }

Specifies the navigation depth. The following settings are available for the depth value: "month" - Shows the days of the month.; "year" - Shows the months of the year.; "decade" - Shows the years of the decade. or "century" - Shows the decades from the century..

C#
public CalendarView? Depth { get; set; }

An array or function that will be used to determine which dates to be disabled in the calendar.

C#
public DateTime[] DisableDates { get; set; }

The template which renders the footer. If false, the footer will not be rendered.

C#
public string Footer { get; set; }

The template which renders the footer. If false, the footer will not be rendered.

C#
public string FooterHandler { get; set; }

Specifies the format, which is used to parse value set with value() method.

C#
public string Format { get; set; }

Specifies the maximum date, which the calendar can show.

C#
public DateTime? Max { get; set; }

Specifies the minimum date, which the calendar can show.

C#
public DateTime? Min { get; set; }

The name of the JavaScript function that will handle the change event. Fires when the selected date is changed.

C#
public string OnChange { get; set; }

The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the Calendar is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnKendoKeydown { get; set; }

The name of the JavaScript function that will handle the navigate event. Fires when calendar navigates.

C#
public string OnNavigate { get; set; }

By default user is able to select a single date. The property can also be set to multiple or range. More information about the different selection modes can be found in the Selection article.

C#
public string Selectable { get; set; }

Specifies which dates to be selected when the calendar is initialized.

C#
public DateTime[] SelectDates { get; set; }

When this configuration is enabled, the calendar will render days from the previous and next months in the current view.

C#
public bool? ShowOtherMonthDays { get; set; }

Specifies the start view. The following settings are available for the start value: "month" - Shows the days of the month.; "year" - Shows the months of the year.; "decade" - Shows the years of the decade. or "century" - Shows the decades from the century..

C#
public CalendarView? Start { get; set; }

Specifies the selected date.

C#
public DateTime? Value { get; set; }

If set to true a week of the year will be shown on the left side of the calendar.

C#
public bool? WeekNumber { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: CalendarBaseTagHelper.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: CalendarBaseTagHelper.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: CalendarBaseTagHelper.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: CalendarBaseTagHelper.WriteHtml(TagHelperOutput)