/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components-examples/material/timepicker/timepicker-forms/timepicker-forms-example.ts
23 строки
873 B
Kristiyan Kostadinov
docs: remove OnPush from examples
18 май 2026, 10:44
18 май 2026, 10:44
8bc245b
Код
Авторство
О чём код?
import {Component} from '@angular/core'; import {FormControl, ReactiveFormsModule} from '@angular/forms'; import {MatTimepickerModule} from '@angular/material/timepicker'; import {MatInputModule} from '@angular/material/input'; import {MatFormFieldModule} from '@angular/material/form-field'; import {provideNativeDateAdapter} from '@angular/material/core'; /** @title Timepicker forms integration */ @Component({ selector: 'timepicker-forms-example', templateUrl: 'timepicker-forms-example.html', providers: [provideNativeDateAdapter()], imports: [MatFormFieldModule, MatInputModule, MatTimepickerModule, ReactiveFormsModule], }) export class TimepickerFormsExample { formControl: FormControl<Date | null>; constructor() { const initialValue = new Date(); initialValue.setHours(12, 30, 0); this.formControl = new FormControl(initialValue); } }