Search
ItemSettings.titleFormat Property
See Also
 






Gets or sets a value indicating how to format and display item titles.

Namespace: MindFusion.Scheduling
File: ItemSettings.js

 Syntax

JavaScript  Copy Code

get titleFormat() {}

 Property Value

String. The format string.

 Remarks

The following reserved strings can be used to construct the desired title format:

  • %s to indicate format for the startTime of an Item.
  • %e to indicate format for the endTime of an Item.
  • %d to indicate the format of the description of an Item.
  • %h to indicate format of the header text of the Item.

A valid format string will be: "%e[hh:mm tt] %d" where the description of the item is formatted to render first the start time in format HH:MM AM/PM before the description text. 

 Example

The following code renders the start time of the event in format "10:30 AM" before the title of an event:

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// create a new instance of the calendar
var calendar = new p.Calendar(document.getElementById("calendar"));

//add the start time prefix before each subject
calendar.itemSettings.titleFormat = "%s[hh:mm tt] %h";

 See Also