From 9571a7b2e931e435cb2d0f2dfa6bc8aab3e90b8d Mon Sep 17 00:00:00 2001 From: mdlufy Date: Tue, 26 Nov 2024 19:33:45 +0300 Subject: [PATCH] chore(demo): `InputDateTime` simplify --- .../input-date-time/examples/7/index.html | 16 +++++++--------- .../input-date-time/examples/7/index.ts | 11 ++++------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/projects/demo/src/modules/components/input-date-time/examples/7/index.html b/projects/demo/src/modules/components/input-date-time/examples/7/index.html index 46977781cce0..a2c088c3aa5a 100644 --- a/projects/demo/src/modules/components/input-date-time/examples/7/index.html +++ b/projects/demo/src/modules/components/input-date-time/examples/7/index.html @@ -1,11 +1,9 @@ -
- Choose date and time - +Choose date and time + -

Form value:

+

Form value:

-
{{ testForm.value | json }}
-
+
{{ control.value | json }}
diff --git a/projects/demo/src/modules/components/input-date-time/examples/7/index.ts b/projects/demo/src/modules/components/input-date-time/examples/7/index.ts index 754c65c96b25..492cd68ca41d 100644 --- a/projects/demo/src/modules/components/input-date-time/examples/7/index.ts +++ b/projects/demo/src/modules/components/input-date-time/examples/7/index.ts @@ -3,7 +3,6 @@ import {Component} from '@angular/core'; import { AbstractControl, FormControl, - FormGroup, ReactiveFormsModule, type ValidationErrors, type ValidatorFn, @@ -35,10 +34,8 @@ const completeDateTimeValidator: ValidatorFn = ( changeDetection, }) export default class Example { - protected readonly testForm = new FormGroup({ - testValue: new FormControl( - [new TuiDay(2017, 2, 15), null], - completeDateTimeValidator, - ), - }); + protected readonly control = new FormControl( + [new TuiDay(2017, 2, 15), null], + completeDateTimeValidator, + ); }