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

Patch Changes

  • c806d33 Thanks
    @segunadebayo! - Add data-invalid to getLabelProps() and getControlProps() so
    the label and control can be styled when invalid is set.

  • ac82db1 Thanks
    @segunadebayo! - Fix year cells being disabled when they fall outside the decade
    currently in view, even with no min or max set. Only min and max decide whether a year can be selected now.
    Cells outside the visible decade still get data-outside-range for styling, and remain excluded from the hovered
    range in a year range picker.

    Also fix End in the year view focusing two years past the last cell in the grid.

    Breaking: getDecadeRange from @zag-js/date-utils no longer accepts the { strict } option and always returns
    the ten years of the decade. It previously returned twelve by default, which is what put End out of bounds. Drop the
    option if you were passing { strict: true }; there is no replacement for the twelve-year form.

  • 06be915 Thanks
    @segunadebayo! - Fix api.setOpen ignoring a second call made in the same tick.
    setOpen(true) immediately followed by setOpen(false) left the component open instead of closed, and only worked if
    you awaited a microtask between the two calls.

    The last call in a tick now wins, and calling setOpen repeatedly with the same value still invokes onOpenChange
    once. Drawer's api.setSnapPoint had the same problem and behaves the same way now.

  • Updated dependencies [2668edc,
    ac82db1,
    de9aeaa,
    06be915]:

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

Don't miss a new zag release

NewReleases is sending notifications on new releases.