Skip to content

Bug Report: DatePicker onChange only fires after full year input #5661

@grillalexander

Description

@grillalexander

HeroUI Version

2.7.5

Package: @heroui/react
Version: 2.7.5
Environment:
React: 18.2.0
Next.js: 15.4.7

Description

When using the DatePicker component, the onChange event is only triggered after the last 4 digits of the year have been fully entered.

Expected behavior:
onChange should fire as soon as the date value changes (e.g., when typing day, month, or partial year).

Actual behavior:
The event only fires after the complete year (all 4 digits) has been entered.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

import { DatePicker } from "@heroui/react";

export default function Example() {
return (
<DatePicker
label="Select date"
onChange={(value) => console.log("Changed:", value)}
/>
);
}

Expected behavior

✅ Expected Result

onChange should be called whenever the date value changes (e.g., when day, month, or partial year is updated).

❌ Actual Result

onChange is delayed until the full 4-digit year has been entered.

Operating System Version

macOS Version 15.6.1 (24G90)

Browser

Chrome

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions