Skip to main content

getValue()

returns the current value of a DatePicker control

getValue<T extends boolean = false>(asDate?: T): string | Date;

Parameters:

asDate: boolean - defines whether a date will be returned as a Date object

Returns:

A string, or Date with the current value of the control.

Example

var value = form.getItem("datepicker").getValue();// -> "03/06/19"
var value = form.getItem("datepicker").getValue(true);// -> Mon Jun 03 2019 00:00:00 GMT+0300