MOBILE-4600 data: Fix date field during edit

main
Pau Ferrer Ocaña 2024-05-23 22:34:13 +02:00
parent a4136c3f1a
commit e40426d454
1 changed files with 4 additions and 3 deletions

View File

@ -1,16 +1,17 @@
<span *ngIf="inputMode && form && searchFields" [formGroup]="form"> <span *ngIf="inputMode && form" [formGroup]="form">
<span *ngIf="editMode" [core-mark-required]="field.required" class="core-mark-required"></span> <span *ngIf="editMode" [core-mark-required]="field.required" class="core-mark-required"></span>
<ion-datetime-button datetime="datetime" /> <ion-datetime-button datetime="datetime" />
<ion-modal [keepContentsMounted]="true"> <ion-modal [keepContentsMounted]="true">
<ng-template> <ng-template>
<ion-datetime id="datetime" [formControlName]="'f_'+field.id" [max]="maxDate" [min]="minDate" <ion-datetime id="datetime" [formControlName]="'f_'+field.id" [max]="maxDate" [min]="minDate"
[disabled]="searchMode && !searchFields['f_'+field.id+'_z']" presentation="date" [showDefaultButtons]="true" /> [disabled]="searchMode && searchFields && !searchFields['f_'+field.id+'_z']" presentation="date"
[showDefaultButtons]="true" />
</ng-template> </ng-template>
</ion-modal> </ion-modal>
<core-input-errors *ngIf="error && editMode" [control]="form.controls['f_'+field.id]" [errorText]="error" /> <core-input-errors *ngIf="error && editMode" [control]="form.controls['f_'+field.id]" [errorText]="error" />
<ion-item *ngIf="searchMode" class="ion-text-wrap"> <ion-item *ngIf="searchMode && searchFields" class="ion-text-wrap">
<ion-checkbox [formControlName]="'f_'+field.id+'_z'" [(ngModel)]="searchFields['f_'+field.id+'_z']"> <ion-checkbox [formControlName]="'f_'+field.id+'_z'" [(ngModel)]="searchFields['f_'+field.id+'_z']">
{{ 'addon.mod_data.usedate' | translate }} {{ 'addon.mod_data.usedate' | translate }}
</ion-checkbox> </ion-checkbox>