Skip to content

Commit

Permalink
Angular Forms In Depth
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Dec 14, 2020
1 parent 41d8a95 commit 81a15b1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@

</mat-form-field>

<mat-form-field>

<mat-label>Promotional period</mat-label>

<mat-date-range-input [rangePicker]="promoPicker">

<input matStartDate placeholder="Start date" formControlName="promoStartAt">

<input matEndDate placeholder="End date" formControlName="promoEndAt">

</mat-date-range-input>

<mat-datepicker-toggle matSuffix [for]="promoPicker"></mat-datepicker-toggle>

<mat-date-range-picker #promoPicker></mat-date-range-picker>

</mat-form-field>

</div>

<div class="form-val">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export class CreateCourseStep2Component implements OnInit {
Validators.min(1),
Validators.max(9999),
Validators.pattern("[0-9]+")
]]
]],
promoStartAt: [null],
promoEndAt: [null]
});

constructor(private fb: FormBuilder) {
Expand Down

0 comments on commit 81a15b1

Please sign in to comment.