flowbite-react
flowbite-react copied to clipboard
fix(datepicker): datePicker now supports formatting of date
🛠️ Enhancement: Added Date Formatting Support to DatePicker
This PR introduces date formatting support to the DatePicker component by leveraging the date-fns
package. Users can now customize date formats such as dd-MMM-yyyy
or dd MMM yyyy
according to their preferences.
outputs/examples:
dd-MMM-yyyy // output => 11-Mar-2024
dd MMM yyyy // output => 11 Mar 2024
dd-MM-yyyyy // output => 11-03-2024
Summary by CodeRabbit
-
New Features
- Introduced a Datepicker component with configurable date formats and localization support.
- Added documentation for date format and localization settings in the Datepicker component.
-
Improvements
- Enhanced Datepicker tests to support various date formats.
- Updated Datepicker to use consistent date formatting and locale settings through
date-fns
.
-
Dependencies
- Added
date-fns
version3.6.0
to support date formatting and localization.
- Added