Skip to content

Commit

Permalink
feat: added changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
Dias, Diego committed Sep 13, 2024
1 parent 4548a0c commit dfef19d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .changeset/six-tips-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
"@flowbite/react": major
---

### Datepicker Component Updates

The Datepicker has been enhanced with several improvements:

1. **Controlled Inputs**: Supports controlled inputs via `value` and `defaultValue` props, enabling programmatic date updates without manual clicks.
2. **State Management**: Optimized internal state management using `useMemo` and `useEffect`.
3. **Documentation**: Added sections in documentation for controlled usage and handling `null` values.
4. **Test Cases**: Comprehensive unit tests added for date handling.
5. **Storybook**: Improved stories, showcasing different states (controlled/uncontrolled).

### Files Updated:

- `apps/web/content/docs/components/datepicker.mdx`: Added controlled usage section.
- `Datepicker.spec.tsx`: Added unit tests.
- `Datepicker.stories.tsx`: Enhanced story variants.
- `Datepicker.tsx`: Expanded `DatepickerProps`.
- `DatepickerContext.tsx`: Adjusted `selectedDate` type.
- `Decades.tsx`, `Months.tsx`, `Years.tsx`: Updated logic to check for `selectedDate`.

0 comments on commit dfef19d

Please sign in to comment.