github chakra-ui/zag @zag-js/date-picker@1.20.0

latest releases: @zag-js/tags-input@1.34.1, @zag-js/tour@1.34.1, @zag-js/aria-hidden@1.34.1...
7 months ago

Minor Changes

  • 1e82a49 Thanks
    @segunadebayo! - Add hover range preview support for date picker range selection
    • Added inHoveredRange, firstInHoveredRange, and lastInHoveredRange properties to DayTableCellState
    • Added corresponding data attributes data-in-hover-range, data-hover-range-start, and data-hover-range-end
    • Hover range states are only active when not overlapping with actual selected range
    • Enables distinct styling for hover preview vs actual selection in range mode

Patch Changes

  • 78dd066 Thanks
    @segunadebayo! - Fix date comparison issues when time components are involved

    This change resolves critical issues with date comparison operations when different date types (CalendarDate,
    CalendarDateTime, ZonedDateTime) are mixed, particularly in scenarios involving time components.

    • Convert now(timeZone) result to CalendarDate to ensure consistent date types without time components across all
      date range preset operations
    • Update constrainValue function to normalize all input dates to CalendarDate before comparison, preventing
      time-component comparison issues
    • Remove redundant date type conversion in getMonthFormatter for cleaner, more efficient code
  • Updated dependencies [78dd066]:

    • @zag-js/date-utils@1.20.0
    • @zag-js/anatomy@1.20.0
    • @zag-js/core@1.20.0
    • @zag-js/types@1.20.0
    • @zag-js/utils@1.20.0
    • @zag-js/dismissable@1.20.0
    • @zag-js/dom-query@1.20.0
    • @zag-js/live-region@1.20.0
    • @zag-js/popper@1.20.0

Don't miss a new zag release

NewReleases is sending notifications on new releases.