mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
put placeholder in date field initial and final on agenda
This commit is contained in:
@@ -117,9 +117,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 ">
|
<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"
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
placeholder="Choose a date"
|
placeholder="Data Inicio*"
|
||||||
[(ngModel)]="postEvent.StartDate"
|
[(ngModel)]="postEvent.StartDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[min]="currentDate"
|
[min]="currentDate"
|
||||||
@@ -149,9 +149,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 ">
|
<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"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Choose a date"
|
placeholder="Data de fim*"
|
||||||
[(ngModel)]="postEvent.EndDate"
|
[(ngModel)]="postEvent.EndDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[min]="currentDate"
|
[min]="currentDate"
|
||||||
|
|||||||
@@ -104,21 +104,6 @@ export class NewEventPage implements OnInit {
|
|||||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||||
this.taskParticipants = this.navParams.get('attendees');
|
this.taskParticipants = this.navParams.get('attendees');
|
||||||
|
|
||||||
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() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -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 ">
|
<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"
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
placeholder="Choose a date"
|
placeholder="Data Inicio*"
|
||||||
[(ngModel)]="postEvent.StartDate"
|
[(ngModel)]="postEvent.StartDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[min]="currentDate"
|
[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 ">
|
<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"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Choose a date"
|
placeholder="Data de fim*"
|
||||||
[(ngModel)]="postEvent.EndDate"
|
[(ngModel)]="postEvent.EndDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[min]="currentDate"
|
[min]="currentDate"
|
||||||
|
|||||||
@@ -133,22 +133,6 @@ export class NewEventPage implements OnInit {
|
|||||||
this.loggeduser = userService.ValidatedUser;
|
this.loggeduser = userService.ValidatedUser;
|
||||||
this.postEvent = new Event();
|
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() {
|
ngOnInit() {
|
||||||
|
|||||||
Reference in New Issue
Block a user