Skip to content

[Bug]: Date Picker resets to a random date when invalid format is entered #21065

@Manudeep090798

Description

@Manudeep090798

Package

@carbon/react

Browser

Chrome

Package version

1.93.0

React version

17.0.2

Description

When the user enters a date in an invalid format (e.g., "14/40/2025"), the Date Picker should show an error indicating that the format is incorrect. Instead, it silently replaces the input with "01/01/2025", which can confuse the user since no feedback is provided.

Reproduction/example

https://react.carbondesignsystem.com/?path=/story/components-datepicker--default

Steps to reproduce

  1. Go to https://react.carbondesignsystem.com/?path=/story/components-datepicker--default
  2. input the Date as "14/40/2025" using keyboard
  3. Value is automatically updated to "01/01/2025"

Suggested Severity

None

Application/PAL

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    ⏱ Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions