Skip to content

Commit

Permalink
fixed display of invalid dates like 00000000
Browse files Browse the repository at this point in the history
  • Loading branch information
amazy committed Nov 18, 2024
1 parent 3467180 commit 782a09a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions WebApplication/src/helpers/date-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ export default {
formatDateForDisplay(dicomDate, dateFormat) {
if (dicomDate && dicomDate.length == 8) {
let d = parse(dicomDate, "yyyyMMdd", new Date());
return format(d, dateFormat);
} else {
return "";
if (!isNaN(d.getDate())) {
return format(d, dateFormat);
}
}
if (dicomDate.length > 0) {
return dicomDate;
}
return "";
},
isDateTag(tagName) {
return ["StudyDate", "PatientBirthDate", "SeriesDate", "AcquisitionDate", "ContentDate"].indexOf(tagName) != -1;
Expand Down
2 changes: 2 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Changes:
Fixes:
- When modifying studies, dates selected from the DatePicker were not always taken into account.
- Fixed the criteria to display the OHIF Segmentation viewer.
- Fixed display of invalid dates like 00000000.


1.6.4 (2024-10-10)
==================
Expand Down

0 comments on commit 782a09a

Please sign in to comment.