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

Kendo UI Scheduler TagHelper SchedulerTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-scheduler")]
[RestrictChildren("current-time-marker", new string[] { "editable", "scheduler-footer", "group", "messages", "pdf", "resources", "toolbar", "views", "scheduler-datasource", "ongoing-events", "scheduler-all-day-event-template", "scheduler-event-template", "scheduler-date-header-template", "scheduler-group-header-template", "scheduler-major-time-header-template", "scheduler-minor-time-header-template", "scheduler-recurrence-rule-label-template" })]
[OutputElementHint("div")]
public class SchedulerTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<SchedulerDataSourceTagHelper>, ITemplateComponent

Inheritance: objectTagHelperTagHelperBaseSchedulerTagHelper

Implements: IDataBoundWidget<SchedulerDataSourceTagHelper>ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()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-scheduler name="scheduler"  timezone="Etc/UTC" height="600">
       <current-time-marker enabled="true" />
       <editable enabled="true" />
       <pdf file-name="SchedulerExport.pdf" proxy-url="@Url.Action("Pdf_Export_Save", "Scheduler")" />
       <toolbar>
           <scheduler-toolbar-button name="pdf"></scheduler-toolbar-button>
       </toolbar>
       <views>
           <view type="day"></view>
           <view type="month" selected="true"></view>
           <view type="agenda"></view>
       </views>
       <scheduler-datasource type="@DataSourceTagHelperType.Ajax">
           <transport>
               <read url="@Url.Action("Date_Grouping_Read", "Scheduler")" />
               <create url="@Url.Action("Date_Grouping_Create", "Scheduler")" />
               <destroy url="@Url.Action("Date_Grouping_Destroy", "Scheduler")" />
               <update url="@Url.Action("Date_Grouping_Update", "Scheduler")" />
           </transport>
           <schema data="Data" total="Total" errors="Errors">
               <scheduler-model id="MeetingID">
                   <fields>
                       <field name="MeetingID" type="number"></field>
                       <field name="title" from="Title" type="string" default-value="@defaultTitle"></field>
                       <field name="start" from="Start" type="date"></field>
                       <field name="end" from="End" type="date"></field>
                       <field name="description" from="Description" type="string"></field>
                       <field name="recurrenceId" from="RecurrenceID" type="number" default-value=null></field>
                       <field name="recurrenceRule" from="RecurrenceRule" type="string" ></field>
                       <field name="recurrenceException" from="RecurrenceException" type="string"></field>
                       <field name="startTimezone" from="StartTimezone" type="string"></field>
                       <field name="endTimezone" from="EndTimezone" type="string"></field>
                       <field name="isAllDay" from="IsAllDay" type="boolean"></field>
                   </fields>
               </scheduler-model>
           </schema>
       </scheduler-datasource>
   </kendo-scheduler>

Constructors

Initializes a new instance of the SchedulerTagHelper class.

C#
public SchedulerTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

The template used to render the "all day" scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; isAllDay Boolean - if true the event is "all day"; resources Array - the event resources; start Date - the event start date or title String - the event title.

C#
public string AllDayEventTemplate { get; set; }

The template used to render the "all day" scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; isAllDay Boolean - if true the event is "all day"; resources Array - the event resources; start Date - the event start date or title String - the event title. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string AllDayEventTemplateHandler { get; set; }

The template used to render the "all day" scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; isAllDay Boolean - if true the event is "all day"; resources Array - the event resources; start Date - the event start date or title String - the event title. This option expects the ID of the script element that contains the template.

C#
public string AllDayEventTemplateId { get; set; }

The template used to render the "all day" scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; isAllDay Boolean - if true the event is "all day"; resources Array - the event resources; start Date - the event start date or title String - the event title. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent AllDayEventTemplateView { get; set; }

If set to true the scheduler will display a slot for "all day" events.

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

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. That will also apply for data sources for the resources used in the widget. By default the widget will bind to the data source specified in the configuration.

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

The Id of the data source.

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

The current date of the scheduler. Used to determine the period which is displayed by the widget.

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

The template used to render the date header cells.By default the scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier represents the abbreviated name of the week day and will be localized using the current Kendo UI culture. If the developer wants to control the day and month order, then one needs to define a custom template.The fields which can be used in the template are: date - represents the major tick date..

C#
public string DateHeaderTemplate { get; set; }

The template used to render the date header cells.By default the scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier represents the abbreviated name of the week day and will be localized using the current Kendo UI culture. If the developer wants to control the day and month order, then one needs to define a custom template.The fields which can be used in the template are: date - represents the major tick date.. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string DateHeaderTemplateHandler { get; set; }

The template used to render the date header cells.By default the scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier represents the abbreviated name of the week day and will be localized using the current Kendo UI culture. If the developer wants to control the day and month order, then one needs to define a custom template.The fields which can be used in the template are: date - represents the major tick date.. This option expects the ID of the script element that contains the template.

C#
public string DateHeaderTemplateId { get; set; }

The template used to render the date header cells.By default the scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier represents the abbreviated name of the week day and will be localized using the current Kendo UI culture. If the developer wants to control the day and month order, then one needs to define a custom template.The fields which can be used in the template are: date - represents the major tick date.. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent DateHeaderTemplateView { get; set; }

The end time of the week and day views. The scheduler will display events ending before the endTime.

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

The template used to render the scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; resources Array - the event resources; start Date - the event start date or title String - the event title.

C#
public string EventTemplate { get; set; }

The template used to render the scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; resources Array - the event resources; start Date - the event start date or title String - the event title. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string EventTemplateHandler { get; set; }

The template used to render the scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; resources Array - the event resources; start Date - the event start date or title String - the event title. This option expects the ID of the script element that contains the template.

C#
public string EventTemplateId { get; set; }

The template used to render the scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; resources Array - the event resources; start Date - the event start date or title String - the event title. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent EventTemplateView { get; set; }

The template used to render the group headers of scheduler day, week, workWeek and timeline views.The fields which can be used in the template are: text String - the group text; color String - the group color; value - the group value; field String - the field of the scheduler event which contains the resource id; title String - the 'title' option of the resource or name String - the 'name' option of the resource.

C#
public string GroupHeaderTemplate { get; set; }

The template used to render the group headers of scheduler day, week, workWeek and timeline views.The fields which can be used in the template are: text String - the group text; color String - the group color; value - the group value; field String - the field of the scheduler event which contains the resource id; title String - the 'title' option of the resource or name String - the 'name' option of the resource. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string GroupHeaderTemplateHandler { get; set; }

The template used to render the group headers of scheduler day, week, workWeek and timeline views.The fields which can be used in the template are: text String - the group text; color String - the group color; value - the group value; field String - the field of the scheduler event which contains the resource id; title String - the 'title' option of the resource or name String - the 'name' option of the resource. This option expects the ID of the script element that contains the template.

C#
public string GroupHeaderTemplateId { get; set; }

The template used to render the group headers of scheduler day, week, workWeek and timeline views.The fields which can be used in the template are: text String - the group text; color String - the group color; value - the group value; field String - the field of the scheduler event which contains the resource id; title String - the 'title' option of the resource or name String - the 'name' option of the resource. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent GroupHeaderTemplateView { get; set; }

The height of the widget. Numeric values are treated as pixels.

C#
public double? Height { get; set; }

The number of minutes represented by a major tick.

C#
public int? MajorTick { get; set; }

The template used to render the major ticks.By default the scheduler renders the time using the current culture time format.The fields which can be used in the template are: date - represents the major tick date..

C#
public string MajorTimeHeaderTemplate { get; set; }

The template used to render the major ticks.By default the scheduler renders the time using the current culture time format.The fields which can be used in the template are: date - represents the major tick date.. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string MajorTimeHeaderTemplateHandler { get; set; }

The template used to render the major ticks.By default the scheduler renders the time using the current culture time format.The fields which can be used in the template are: date - represents the major tick date.. This option expects the ID of the script element that contains the template.

C#
public string MajorTimeHeaderTemplateId { get; set; }

The template used to render the major ticks.By default the scheduler renders the time using the current culture time format.The fields which can be used in the template are: date - represents the major tick date.. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent MajorTimeHeaderTemplateView { get; set; }

Constraints the maximum date which can be selected via the scheduler navigation.

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

Constraints the minimum date which can be selected via the scheduler navigation.

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

The number of time slots to display per major tick.

C#
public int? MinorTickCount { get; set; }

The template used to render the minor ticks.By default the scheduler renders a " ".The fields which can be used in the template are: date - represents the major tick date..

C#
public string MinorTimeHeaderTemplate { get; set; }

The template used to render the minor ticks.By default the scheduler renders a " ".The fields which can be used in the template are: date - represents the major tick date.. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string MinorTimeHeaderTemplateHandler { get; set; }

The template used to render the minor ticks.By default the scheduler renders a " ".The fields which can be used in the template are: date - represents the major tick date.. This option expects the ID of the script element that contains the template.

C#
public string MinorTimeHeaderTemplateId { get; set; }

The template used to render the minor ticks.By default the scheduler renders a " ".The fields which can be used in the template are: date - represents the major tick date.. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent MinorTimeHeaderTemplateView { get; set; }

Defines the mobile modes supported by Kendo UI Scheduler for ASP.NET MVC

C#
public MobileMode? Mobile { get; set; }

The name of the JavaScript function that will handle the add event. Fired when a new event is about to be added.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnAdd { get; set; }

The name of the JavaScript function that will handle the cancel event. Fired when the user cancels editing by clicking the "cancel" button.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnCancel { get; set; }

The name of the JavaScript function that will handle the change event. Fired when the user selects a cell or event in the scheduler.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnChange { get; set; }

The name of the JavaScript function that will handle the dataBinding event. Fired before the widget binds to its data source.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnDataBinding { get; set; }

The name of the JavaScript function that will handle the dataBound event. Fired when the widget is bound to data from its data source.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnDataBound { get; set; }

The name of the JavaScript function that will handle the edit event. Fired when the user opens a scheduler event in edit mode by or creates a new event.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnEdit { get; set; }

The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the Scheduler 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 move event. Fired when the user is moving an event.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnMove { get; set; }

The name of the JavaScript function that will handle the moveEnd event. Fired when the user stops moving an event.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnMoveEnd { get; set; }

The name of the JavaScript function that will handle the moveStart event. Fired when the user starts to drag an event.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnMoveStart { get; set; }

The name of the JavaScript function that will handle the navigate event. Fired when the user changes the selected date, selected Scheduler view or switches between show full day and show business hours.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnNavigate { get; set; }

The name of the JavaScript function that will handle the pdfExport event. Fired when the user clicks the "Export to PDF" toolbar button.

C#
public string OnPdfExport { get; set; }

The name of the JavaScript function that will handle the remove event. Fired when the user performs "destroy" action.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnRemove { get; set; }

The name of the JavaScript function that will handle the resize event. Fired when the user is resizing an event.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnResize { get; set; }

The name of the JavaScript function that will handle the resizeEnd event. Fired when the user releases the mouse after resizing an event.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnResizeEnd { get; set; }

The name of the JavaScript function that will handle the resizeStart event. Fired when the user starts to resize an event.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnResizeStart { get; set; }

The name of the JavaScript function that will handle the save event. Fired when the user saves a scheduler event by clicking the "save" button.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnSave { get; set; }

The template used to render the recurrence trigger summary in the desktop event editor.The template data contains the following fields: rule—The parsed recurrence rule object. or recurrenceRule—The serialized recurrence rule string..

C#
public string RecurrenceRuleLabelTemplate { get; set; }

The template used to render the recurrence trigger summary in the desktop event editor.The template data contains the following fields: rule—The parsed recurrence rule object. or recurrenceRule—The serialized recurrence rule string.. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string RecurrenceRuleLabelTemplateHandler { get; set; }

The template used to render the recurrence trigger summary in the desktop event editor.The template data contains the following fields: rule—The parsed recurrence rule object. or recurrenceRule—The serialized recurrence rule string.. This option expects the ID of the script element that contains the template.

C#
public string RecurrenceRuleLabelTemplateId { get; set; }

The template used to render the recurrence trigger summary in the desktop event editor.The template data contains the following fields: rule—The parsed recurrence rule object. or recurrenceRule—The serialized recurrence rule string.. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent RecurrenceRuleLabelTemplateView { get; set; }

If set to true the user would be able to select scheduler cells and events. By default selection is disabled.

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

If set to true the view will be initially shown in business hours mode. By default view is displayed in full day mode.

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

If set to true the scheduler will snap events to the nearest slot during dragging (resizing or moving). Set it to false to allow free moving and resizing of events.

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

The start time of the week and day views. The scheduler will display events starting after the startTime.

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

Configures the templates for the Scheduler.

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

Implements: ITemplateComponent.Templates

The timezone which the scheduler will use to display the scheduler appointment dates. By default the current system timezone is used. This is an acceptable default when the scheduler widget is bound to local array of events. It is advisable to specify a timezone if the scheduler is bound to a remote service. That way all users would see the same dates and times no matter their configured system timezone.The complete list of the supported timezones is available in the List of IANA time zones Wikipedia page.

C#
public string Timezone { get; set; }

The width of the widget. Numeric values are treated as pixels.

C#
public double? Width { get; set; }

Sets the end of the work day when the "Show business hours" button is clicked.

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

Sets the working days (index based).

C#
public int[] WorkDays { get; set; }

Sets the start of the work day when the "Show business hours" button is clicked.

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

The end of working week (index based).

C#
public int? WorkWeekEnd { get; set; }

The start of working week (index based).

C#
public int? WorkWeekStart { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.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: TagHelperBase.SerializeEvents()

SerializeSettings method.

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

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Serializes the defined templates.

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

Dictionary<string, object>

Overrides: TagHelperBase.SerializeTemplates()

Writes the HTML output.

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

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)