Skip to content

Commit

Permalink
Update meetups-add.component.html
Browse files Browse the repository at this point in the history
Added warning messages if past dates selected in the form
  • Loading branch information
jessewashburn authored Oct 25, 2024
1 parent 01f4da3 commit 504710a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/app/meetups/add-meetups/meetups-add.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@
<input matInput [matDatepicker]="datepickerStart" i18n-placeholder required="true" placeholder="Start Date" formControlName="startDate">
<mat-datepicker-toggle matSuffix [for]="datepickerStart"></mat-datepicker-toggle>
<mat-datepicker #datepickerStart></mat-datepicker>
<mat-error><planet-form-error-messages [control]="meetupForm.controls.startDate"></planet-form-error-messages></mat-error>
</mat-form-field>
<mat-error *ngIf="meetupForm.controls.startDate.hasError('required')">
Start date is required.
</mat-error>
<mat-error *ngIf="meetupForm.controls.startDate.hasError('pastDate')">
Start date cannot be in the past.
</mat-error>
</mat-form-field>
<mat-form-field>
<input matInput [matDatepicker]="datepickerEnd" i18n-placeholder placeholder="End Date" formControlName="endDate">
<mat-datepicker-toggle matSuffix [for]="datepickerEnd"></mat-datepicker-toggle>
Expand Down

0 comments on commit 504710a

Please sign in to comment.