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
const value = form.getItem("datepicker").getValue();
// -> "03/06/19"
const value = form.getItem("datepicker").getValue(true);
// -> Mon Jun 03 2019 00:00:00 GMT+0300