Skip to content

Commit

Permalink
[26180] IContactDetailsDialogTray do use LocalDate for dob
Browse files Browse the repository at this point in the history
  • Loading branch information
col-panic committed May 28, 2024
1 parent c2d3667 commit 5b335ac
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package ch.elexis.core.ui.e4.dialog;

import java.time.LocalDateTime;

import org.apache.commons.lang3.StringUtils;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
Expand Down Expand Up @@ -147,7 +149,8 @@ public void selectionChanged(Object selection) {
txtEmail.setText(StringUtils.trimToEmpty(contact.getEmail()));

if (contact.isPerson()) {
txtDob.setText(TimeUtil.formatSafe(contact.asIPerson().getDateOfBirth()));
LocalDateTime dateOfBirth = contact.asIPerson().getDateOfBirth();
txtDob.setText(TimeUtil.formatSafe(dateOfBirth != null ? dateOfBirth.toLocalDate() : null));
}
}

Expand Down

0 comments on commit 5b335ac

Please sign in to comment.