react-datepicker v9.1.0 Release Notes

Release Date: 2025-12-19 // 9 months ago
  • Highlights

    ๐Ÿš€ This release includes important bug fixes, TypeScript improvements, and a new feature. Most notably, it restores date parsing behavior that was accidentally removed in v8.0.0.

    ๐Ÿ†• New Feature

    ๐Ÿ‘ Allow onClickOutside to prevent calendar from closing (#6179)

    0๏ธโƒฃ The onClickOutside callback can now prevent the calendar from closing by calling event.preventDefault(). This is useful when using custom portal-based dropdowns in the calendar header.

    <DatePicker                                                                                                                                                                           
        onClickOutside={(event) => {                                                                                                                                                        
          if (myPortalRef.current?.contains(event.target)) {                                                                                                                                
            event.preventDefault(); // Keeps calendar open                                                                                                                                  
          }                                                                                                                                                                                 
        }}                                                                                                                                                                                  
      />
    

    Full Changelog

    What's Changed

    ๐Ÿ†• New Contributors

    Full Changelog : v9.0.0...v9.1.0


Previous changes from v9.0.0

  • ๐ŸŒŸ Major New Features

    ๐Ÿ‘ ๐ŸŒ Timezone Support (Finally!)

    The most requested feature is here! Add the timeZone prop to display and handle dates in any timezone. Works with date-fns-tz as an optional peer dependency. <DatePicker timeZone="America/New_York" />

    โฐ Time Selection with Date Ranges

    showTimeSelect and showTimeInput now work beautifully with selectsRange! Select time for both start and end dates independently. ๐ŸŽ‰

    ๐ŸŽ New Props Under the Tree

    • ๐ŸŽฏ popperTargetRef - Custom popper positioning for advanced layouts
    • ๐Ÿ“ monthHeaderPosition - Control month header placement (top, middle, bottom)
    • ๐Ÿ—“๏ธ renderCustomDayName - Customize weekday header rendering
    • ๐Ÿ“ formatMultipleDates - Custom formatting for multi-select dates
    • ๐Ÿ‘ โ™ฟ aria-label - Better accessibility support

    ๐Ÿ›  ๐Ÿ”ง Bug Fixes & Improvements

    • ๐ŸŽฏ Navigate calendar view when typing partial dates
    • โšก๏ธ ๐Ÿ“… Calendar view updates when selected/startDate props change programmatically
    • ๐Ÿ›  ๐Ÿ• Fixed infinite height growth in time picker
    • ๐Ÿ›  ๐Ÿ—“๏ธ Fixed month view jump when selecting from second calendar in range mode
    • โœ๏ธ Allow typing dates before 1800 when minDate permits
    • ๐Ÿ“œ ๐ŸŒ Parse holiday date strings as local time (no more timezone shifts!)
    • ๐Ÿ“ Use em units internally - easily inherit font size from parent!
    • ๐Ÿ›  ๐ŸŽจ Fixed in-selecting-range highlight for days outside current month
    • ๐Ÿšš ๐Ÿ”— Hiding popper arrow now properly removes offset
    • โšก๏ธ ๐Ÿ”„ Fixed preSelection updates for selectsRange input changes
    • โš  ๐Ÿ“Š Improved source maps (no more Webpack warnings!)
    • ๐Ÿ‘ ๐Ÿท๏ธ Better TypeScript discriminated union type inference

    ๐Ÿ› ๏ธ Under the Hood

    • โฌ†๏ธ ๐Ÿš€ Node 24.x LTS - Upgraded CI to latest LTS
    • โšก๏ธ ๐Ÿ“ฆ Updated dependencies across the board
    • โœ… ๐Ÿงช Significantly improved test coverage
    • ๐Ÿ“š ๐Ÿ“š New timezone documentation

    ๐Ÿ’ซ Happy Holidays!

    ๐Ÿš€ Thank you to all contributors who made this release possible! May your dates always be in the right timezone! ๐ŸŽ…๐ŸŽ„


    What's Changed

    ๐Ÿ†• New Contributors

    Full Changelog : v8.10.0...v9.0.0