-
-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dias, Diego
committed
Sep 13, 2024
1 parent
4548a0c
commit dfef19d
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. |