chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

Date Picker Input Widget

Open Allaoua9 opened this issue 1 week ago • 0 comments
trafficstars

This PR is related to https://github.com/Chainlit/chainlit/issues/2652

  • Backend: new DatePicker widget class with mode, min/max, placeholder, and ISO validation, exposed via InputWidgetType.
  • Frontend: DatePickerInput component (single + range) based on shadcn datepicker.
  • i18n: locale-aware formatting via getDateFnsLocale plus placeholder strings in every translation file.
  • Dependencies: add react-day-picker@^9.11.1 and date-fns@^4.1.0.

Single Date

Capture d'écran 2025-11-14 110158

Date Range :

image

Summary by cubic

Added a DatePicker input widget for chat settings with single and range modes, min/max bounds, ISO-safe values, and locale-aware display.

  • New Features

    • Backend: DatePicker widget with mode, initial/min/max, format, placeholder, ISO parsing/validation, and InputWidgetType "datepicker".
    • Frontend: DatePickerInput (single and range) with calendar UI, confirm/reset for ranges, disabled days from bounds, and integration in FormInput.
    • i18n: locale mapping via date-fns and placeholders across all translations.
  • Dependencies

    • Added react-day-picker ^9.11.1 and date-fns ^4.1.0.

Written for commit 5fe341e14cf4021dc3a8f0ac1ce4a5ccda5060bc. Summary will update automatically on new commits.

Allaoua9 avatar Nov 14 '25 10:11 Allaoua9