Search
Calendar.minSpan Property
See Also
 






Gets or sets the minimum date-time span of the calendar.

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

 Syntax

JavaScript  Copy Code

get minSpan() {}

 Property Value

TimeUnit. One of the TimeUnit enumeration values.

 Remarks

Currently supported values are TimeSpan.Day, TimeSpan.Month, TimeSpan.Year and TimeSpan.Decade.

 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 min span is set to day.

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.maxSpan = u.TimeSpan.Month;
calendar.minSpan = u.TimeSpan.Day;

 See Also