Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

[Bug] Year 2025 Missing in Search Options for OHIF Viewer Date Picker

Open donnimsipa opened this issue 1 year ago • 3 comments

Describe the Bug

🎉 Happy New Year 2025! May this year bring us all exciting opportunities, great accomplishments, and lots of joy! 🎆

I’ve noticed an issue in the date picker feature of OHIF Viewer: it doesn’t display the year 2025 as an option. As of January 1, 2025, users are unable to search or select any date in the current year, with the latest available year being 2024.

Steps to Reproduce

  1. Open OHIF Viewer https://viewer.ohif.org/
  2. Navigate to the date picker from start date.
  3. Check the available years in the dropdown or calendar interface.

The current behavior

Image The year 2025 is missing from the date picker options, latest available year is 2024.

The expected behavior

The date picker should include the year 2025 in the available options, allowing users to select and search data for the current year.

On a related note, is it possible to set the default date filter in the worklist to automatically use today’s date, based on the client-side system date?

OS

Windows 11

Node version

Browser

Chrome 131.0.0

donnimsipa avatar Jan 01 '25 11:01 donnimsipa

add following in \platform\ui-next\src\components\DateRange\DateRange.tsx

line no 149 <Calendar initialFocus mode="single" defaultMonth={start ? parse(start, 'yyyy-MM-dd', new Date()) : new Date()} selected={end ? parse(end, 'yyyy-MM-dd', new Date()) : undefined} onSelect={handleEndSelect} numberOfMonths={1} toYear={new Date().getFullYear()} <--- Add this />

line no 111 <Calendar initialFocus mode="single" defaultMonth={start ? parse(start, 'yyyy-MM-dd', new Date()) : new Date()} selected={start ? parse(start, 'yyyy-MM-dd', new Date()) : undefined} onSelect={handleStartSelect} numberOfMonths={1} toYear={new Date().getFullYear()} <---- Add this />

systimearvind avatar Jan 02 '25 13:01 systimearvind

Thank you!

chanbergg avatar Jan 02 '25 18:01 chanbergg

I Would like to fix this issue

shreyansh-c avatar Jan 04 '25 08:01 shreyansh-c