Closed daboudii closed 3 years ago
For this expected output, you will need to use your DateAdapter (or the Native one) to process the Date, like:
import { NativeDateAdapter } from '@matheo/datepicker/core';
constructor(private adapter: NativeDateAdapter) {}
save(): void {
const myTime = this.adapter.format(this.form.value.time, { hour: 'numeric', minute: 'numeric', second: 'numeric' });
}
Note that the parameters of the format
method depends on the Adapter;
luxon
or moment
uses other kind of format expressions.
Describe the bug
Maybe I am expecting too much from this very nice lib but. When I'm selecting a time
13:27:45
, the value of the form update to a full date like2021-06-14T13:27:45.099Z
Expected behavior
The form should update the value with
13:27:45
Your Environment
Angular Version: