getValue

returns the selected date

Date|Date[]|string|string[] getValue(boolean asDate);

Parameters

asDatebooleandefines whether a date will be returned as a Date object

Returns

Date|Date[]|string|string[]the selected date

Example

var date = calendar.getValue(); // -> "03/06/19"
 
var date = calendar.getValue(true); // -> Fri Jan 11 2019 18:09:15 GMT+0300
 
// for a range calendar as an array of Date values 
var date = calendar.getValue(true); 
// -> [Mon Jun 03 2019 00:00:00 GMT+0300, Wed Jun 19 2019 00:00:00 GMT+0300]
 
// for a range calendar as an array of string values 
var date = calendar.getValue(); // ->  ["03/06/19", "19/06/19"]

Related samples

See also
Back to top