This method returns the allowed interval for the selected Date control.
Syntax
ctrl.getAllowedInterval()
Arguments
No arguments.
Return value
Returns the [start, end] array as a JavaScript Date object.
Example
getAllowedInterval() can be used in the JavaScript OnLoad event, as well as any other JavaScript event.
Set the allowed interval and then make the interval have an open upper boundry:
var ctrl = Runner.getControl(pageid, 'datefield');
//set the allowed interval
ctrl.setAllowedInterval( '2019-12-10', '2019-12-24', 'error message' );
//........................
//get the allowed interval
var interval = ctrl.getAllowedInterval();
//get the lower boundry of the interval
start_date = interval[0];
//set the new allowed interval with an open upper boundry
ctrl.setAllowedInterval( start_date, null );
Note: replace "datefield" and "error message" with the actual field name and error message in the function.
See also:
•JavaScript API: Control object > getControl()
•JavaScript API: Date Control API > setAllowedInterval()