Merge branch 'feature/placeholder-date' into develop

This commit is contained in:
Eudes Inácio
2022-07-15 10:13:39 +01:00
8 changed files with 22 additions and 53 deletions
@@ -123,9 +123,9 @@
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
<mat-form-field class="date-hour-picker">
<mat-form-field appearance="none" class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Choose a date"
placeholder="Data Inicio*"
[(ngModel)]="postEvent.StartDate"
[disabled]="disabled"
[min]="currentDate"
@@ -155,9 +155,9 @@
-->
<div (click)="openFim()" class="ion-input-class flex-grow-1 justify-center align-center materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
<mat-form-field class="date-hour-picker">
<mat-form-field appearance="none" class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="fim"
placeholder="Choose a date"
placeholder="Data de fim*"
[(ngModel)]="postEvent.EndDate"
[disabled]="disabled"
[min]="currentDate"
@@ -133,22 +133,6 @@ export class NewEventPage implements OnInit {
this.loggeduser = userService.ValidatedUser;
this.postEvent = new Event();
let now = new Date();
if(now.getMinutes() <= 30) {
this.autoStartTime = new Date(now.setMinutes(30));
this.postEvent.StartDate = this.autoStartTime;
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
this.postEvent.EndDate = this.autoEndTime;
}
else {
this.autoStartTime = new Date(now.setHours(now.getHours()+1));
this.autoStartTime = new Date(this.autoStartTime.setMinutes(0));
this.postEvent.StartDate = this.autoStartTime;
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
this.postEvent.EndDate = this.autoEndTime;
}
}
ngOnInit() {
@@ -41,9 +41,9 @@
</ion-datetime>
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
<input matInput [ngxMatDatetimePicker]="picker1"
placeholder="Choose a date*"
placeholder="Data inicio*"
[(ngModel)]="folder.DateBegin"
[disabled]="disabled"
[min]="currentDate"
@@ -80,12 +80,12 @@
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
<input matInput [ngxMatDatetimePicker]="picker2"
placeholder="Choose a date*"
placeholder="Data de fim*"
[(ngModel)]="folder.DateEnd"
[disabled]="disabled"
[min]="currentDate"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker2"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="picker2"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker2
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -45,10 +45,10 @@ export class NewActionPage implements OnInit {
this.folder = new PublicationFolder();
this.folder = Object.assign(this.folder, {
/* this.folder = Object.assign(this.folder, {
DateBegin: new Date().toISOString(),
DateEnd: (new Date(new Date().getTime() + 15 * 60000)).toISOString(),
})
}) */
}