Skip to content

Commit

Permalink
MOBILE-3947 datetime: Display placeholder if datetime value is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
dpalou committed Mar 11, 2024
1 parent 864087c commit 7287a9b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
</label>
</ion-label>

<ion-datetime-button datetime="profile-field-datetime-{{field.shortname}}" id="profile-field-datetime-{{field.shortname}}-button" />
<ion-datetime-button datetime="profile-field-datetime-{{field.shortname}}" id="profile-field-datetime-{{field.shortname}}-button">
<ng-container *ngIf="control?.value === undefined">
<span slot="date-target">{{ 'core.choosedots' | translate }}</span>
<span slot="time-target">{{ 'core.choosedots' | translate }}</span>
</ng-container>
</ion-datetime-button>
<ion-modal [keepContentsMounted]="true">
<ng-template>
<ion-datetime id="profile-field-datetime-{{field.shortname}}" [formControlName]="modelName"
Expand Down
5 changes: 5 additions & 0 deletions src/theme/theme.base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,11 @@ ion-item.item-label-stacked ion-datetime-button {
align-self: self-end;
}

ion-datetime-button p {
margin-top: 4px;
margin-bottom: 4px;
}

// Table App styles
table.core-table {
border-collapse: collapse;
Expand Down

0 comments on commit 7287a9b

Please sign in to comment.