fix create action mobile

This commit is contained in:
Peter Maquiran
2023-01-19 12:05:14 +01:00
parent d8e8066eae
commit 39f1884aac
2 changed files with 9 additions and 9 deletions
@@ -98,9 +98,9 @@ export class NewActionPage implements OnInit {
var validado: boolean;
if (window.innerWidth <= 800) {
if ((this.folder.DateBegin < this.folder.DateEnd) && (new Date(this.folder.DateBegin).getTime() > this.currentDate.getTime())) {
if ((this.folder.DateBegin < this.folder.DateEnd)) {
validado = true;
}else{
} else {
validado = false;
}
return validado == true ? ['ok']: [];
@@ -111,7 +111,7 @@ export class NewActionPage implements OnInit {
runValidation() {
this.validateFrom = true;
if(new Date(this.folder.DateBegin).toISOString() > new Date(this.folder.DateEnd).toISOString()){
if(new Date(this.folder.DateBegin).getTime() > new Date(this.folder.DateEnd).getTime()){
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
}
}