set default value to form inputs

This commit is contained in:
Peter Maquiran
2021-07-08 15:15:29 +01:00
parent b515a0454d
commit c34d7b16d9
8 changed files with 35 additions and 10 deletions
@@ -93,6 +93,7 @@ export class EditEventPage implements OnInit {
}
this.getAttachments(this.postEvent.EventId);
}
ngOnInit() {
@@ -19,7 +19,7 @@
</div>
<div *ngIf="Form && validateFrom" >
<!-- <div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
<div *ngIf="Form.get('Subject').errors?.required">
Campo obrigatório.
@@ -28,7 +28,7 @@
O campo deve ter pelo menos 4 caracteres.
</div>
</div>
</div>
</div> -->
<div class="container-div">
<div class="ion-item-class-2">
@@ -46,7 +46,7 @@
</div>
<div *ngIf="Form && validateFrom" >
<!-- <div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
<div *ngIf="Form.get('Location').errors?.required">
Campo obrigatório.
@@ -55,7 +55,7 @@
O campo deve ter pelo menos 4 caracteres.
</div>
</div>
</div>
</div> -->
<div class="container-div">
<div class="ion-item-class-2">
@@ -75,13 +75,13 @@
</div>
</div>
<div *ngIf="Form && validateFrom" >
<!-- <div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('CalendarName').invalid " class="input-errror-message">
<div *ngIf="Form.get('CalendarName').errors?.required">
Campo obrigatório.
</div>
</div>
</div>
</div> -->
<div class="container-div">
<div class="ion-item-class-2">
@@ -102,14 +102,14 @@
</div>
</div>
<div *ngIf="Form && validateFrom" >
<!-- <div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('Categories').invalid " class="input-errror-message">
{{ postEvent.Categories[0] }}
<div *ngIf="Form.get('Categories').errors?.required">
Campo obrigatório.
</div>
</div>
</div>
</div> -->
<div class="container-div">
<div class="ion-item-class-2">
@@ -74,6 +74,10 @@ export class NewEventPage implements OnInit {
this.selectedSegment = this.navParams.get('segment');
this.selectedDate = this.navParams.get('eventSelectedDate');
this.postEvent.StartDate = new Date()
this.postEvent.EndDate = (new Date(new Date().getTime() + 15 * 60000))
}
ngOnInit() {