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

MonthTemplateTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("month", ParentTag = "kendo-calendar", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("month-template", ParentTag = "kendo-datepicker", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("month", ParentTag = "kendo-daterangepicker", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("month", ParentTag = "kendo-multiviewcalendar", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("month-template", ParentTag = "kendo-datetimepicker", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("content-template", new string[] { "empty-template", "week-number-template" })]
[SuppressTagRendering]
public class MonthTemplateTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent, ITemplateComponent

Inheritance: objectTagHelperTagHelperChildBaseMonthTemplateTagHelper

Implements: ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.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">
    <month content="Month cell"></month>
</kendo-calendar>

Constructors

Initializes a new instance of the MonthTemplateTagHelper class.

C#
public MonthTemplateTagHelper()

Properties

The template to be used for rendering the cells in "month" view, which are between the min/max range.

C#
public string Content { get; set; }

The JavaScript function that returns the template to be used for rendering the cells in "month" view, which are between the min/max range.

C#
public string ContentHandler { get; set; }

The template to be used for rendering the cells in "month" view, which are between the min/max range.

C#
[HtmlAttributeName("content-id")]
public string ContentId { get; set; }

The template to be used for rendering the cells in "month" view, which are between the min/max range.

C#
public IHtmlContent ContentView { get; set; }

The template used for rendering cells in the "month" view, which are outside the min/max range.

C#
public string Empty { get; set; }

The JavaScript function that returns the template used for rendering cells in the "month" view, which are outside the min/max range.

C#
public string EmptyHandler { get; set; }

The template used for rendering cells in the "month" view, which are outside the min/max range.

C#
[HtmlAttributeName("empty-id")]
public string EmptyId { get; set; }

The template used for rendering cells in the "month" view, which are outside the min/max range.

C#
public IHtmlContent EmptyView { get; set; }

Represents a collection of templates defined for the component.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

The template to be used for rendering the cells in "week" column. By default, the widget renders the calculated week of the year. The properties available in the data object are: currentDate - returns the first date of the current week. or weekNumber - calculated week number.. These properties can be used in the template to make additional calculations.

C#
public string WeekNumber { get; set; }

The JavaScript function that returns the template to be used for rendering the cells in "week" column. By default, the widget renders the calculated week of the year. The properties available in the data object are: currentDate - returns the first date of the current week. or weekNumber - calculated week number.. These properties can be used in the template to make additional calculations.

C#
public string WeekNumberHandler { get; set; }

The template to be used for rendering the cells in "week" column. By default, the widget renders the calculated week of the year. The properties available in the data object are: currentDate - returns the first date of the current week. or weekNumber - calculated week number.. These properties can be used in the template to make additional calculations.

C#
[HtmlAttributeName("week-number-id")]
public string WeekNumberId { get; set; }

The template to be used for rendering the cells in "week" column. By default, the widget renders the calculated week of the year. The properties available in the data object are: currentDate - returns the first date of the current week. or weekNumber - calculated week number.. These properties can be used in the template to make additional calculations.

C#
public IHtmlContent WeekNumberView { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

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

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

Dictionary<string, object>