Time Control Documentation

The Time Control is used to create ARDI-style time/date selection boxes in 3rd party products or ARDI addons.

Importing

To use it, you'll first need to import the required Javascript libraries.

<script src="/addons/dexplore/moment.min.js"></script>
<script src="/addons/dexplore/daterangepicker.js"></script>
<script src="/plugins/optrix/timecontrols.js"></script>

HTML

In HTML, you'll need to create an input control with a unique ID or class name.

Initialising

When you want to initialise the control (normally in the pages onload event or in a script tag at the bottom of the page), you call the timeselector function with an array of configuration options.

For example…

var tsoptions = {
		"server": "serverurl",		
		"minScale": 10,
		"maxScale": 60*24,		
		"startDate": 'startdate',
		"endDate": 'enddate',
		"inline": true,		
		"anchor": 'right',		
		"onrangechange": function (st,en,ust,uen){
			content
		}
	};
 
	 $('#daterange').timeselector(tsoptions);

See the list of available options.