Search
Calendar.formatInfo Property
See Also
 






Gets the DateSettings object used to format and display date and time information in the calendar.

Namespace: MindFusion.Common.UI
File: Calendar.js

 Syntax

JavaScript  Copy Code

get formatInfo() {}

 Property Value

An instance of the DateSettings class.

 Example

The following code creates a new Calendar instance using a reference to an HTML div with an id "calendar". The view is set to DayView and the date is 25th of June, 2020. The hour is 14:58. The dateFormats property of formatInfo is used to specified the short time format.

JavaScript  Copy Code

var u = MindFusion.Common.UI;

var calendar = u.Calendar(document.getElementById("calendar"));
calendar.view = new u.DayView();
calendar.date = new Date(2020, 5, 25, 14, 58, 0, 0);
calendar.formatInfo.dateFormats.shortTime = "h:mm tt";

 See Also