Я использую owl-date-time, мне бы хотелось, чтобы секунды всегда были равны 0, но я не смог их получить.
Я пытаюсь работать с форматами, но не получилось:
import { OWL_DATE_TIME_FORMATS } from 'ng-pick-datetime';
export const MY_NATIVE_FORMATS = {
fullPickerInput: {year: 'numeric', month: 'numeric', day: 'numeric'},
datePickerInput: {year: 'numeric', month: 'numeric', day: 'numeric'},
timePickerInput: {hour: 'numeric', minute: 'numeric', second},
monthYearLabel: {year: 'numeric', month: 'short'},
dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},
monthYearA11yLabel: {year: 'numeric', month: 'long'},
};
@Component({
selector: 'my-selector',
templateUrl: './my-selector.component.html',
styleUrls: ['./my-selector.component.scss'],
providers: [
{provide: OWL_DATE_TIME_FORMATS, useValue: MY_NATIVE_FORMATS},
]
})
Я также пытался расширить DateTimeAdapter, но событие не смогло заставить его работать.
это можно сделать?