mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
change date picker
This commit is contained in:
@@ -164,6 +164,7 @@
|
||||
placeholder="Fim*"
|
||||
[(ngModel)]="postData.EndDate"
|
||||
[disabled]="disabled"
|
||||
[min]="postData.StartDate"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #fim
|
||||
|
||||
@@ -165,6 +165,10 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
this.validateFrom = true
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
return new Date(this.postData.StartDate).getTime() < new Date(this.postData.EndDate).getTime() ? 'ok': null
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
|
||||
this.Form = new FormGroup({
|
||||
@@ -178,7 +182,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
CalendarName: new FormControl(this.postData.CalendarName, [
|
||||
// Validators.required
|
||||
]),
|
||||
Date: new FormControl( (this.postData.StartDate < this.postData.EndDate), [
|
||||
Date: new FormControl( (this.dateValid), [
|
||||
Validators.required
|
||||
]),
|
||||
participantes: new FormControl(this.taskParticipants, [
|
||||
|
||||
Reference in New Issue
Block a user