Datepicker middle navigation button disabled for minDate Month
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với component Datepicker và hàm isDateInRange(), sau đó tái hiện hành vi trong story Datepicker của Flowbite Storybook. Hoàn thành có nghĩa là nút trong header cho phép điều hướng đến một tháng chứa minDate hoặc maxDate, kể cả khi cả hai giới hạn đều nằm trong cùng một tháng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Steps to reproduce
- Go to the Datepicker component and set minDate={new Date()} as the current date. The maxDate can be any date in the following month.
- If your minDate is set to any day other than the first of the month, when you switch to the month view, the month containing your minDate will be disabled.
The issue seems to stem from the isDateInRange() function, which considers newDate as the first day of the month. This function should be split into two: one for days and another for months, years, and decades. While the current function works fine for day selection, it should be slightly modified for months, years, and decades to allow navigation and selection even if minDate or maxDate falls within the same month.
Current behavior
When minDate is set to any day other than the first of the month, the month button is disabled when navigating back to that month.
Expected behavior
The header button should allow navigation to the month containing the minDate.
Context
The desired functionality is to enable navigation to the month where minDate is set, even if it isn't the first of the month. Additionally, if both minDate and maxDate are within the same month, the button should still allow navigation to that month. Currently, when using the change view button, the month becomes disabled, and the user is forced to shift to the next month if maxDate is in the future.
Here is a short video of me on Flowbite Storybook's Datepicker story, showing the issue when trying to click the button with no response:
https://github.com/user-attachments/assets/08e3e153-24bc-4853-a35d-5503c392045d
- Ngôn ngữ chính
- TypeScript
- Star
- 2.2k
- Fork
- 504
- Merge trung bình
- 19 giờ 16 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của themesberg/flowbite-react
-
fix(Carousel): can't give dynamic children to CarouselCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở:bug: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
themesberg/flowbite-react#1469 · 1 bình luận ·
-
Pagination is broken if there is only one pageCó thể đã có người làm @Mukilan1600 đã nhận 1021 ngày trước. Đang mở:bug: bug confirmed good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
themesberg/flowbite-react#1048 · 7 bình luận · 1 reaction ·
-
:books: documentation help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
themesberg/flowbite-react#1696 · 2 bình luận ·
-
Add a QRCode componentĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
themesberg/flowbite-react#1693 ·
-
NavbarCollapse closes when toggling a MegaMenuDropdown on mobileCó thể làm lại được @sarthak-11231 đã nhận 45 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
themesberg/flowbite-react#1686 · 2 bình luận ·
Tất cả issue của themesberg/flowbite-react
Issue tương tự
-
area:frontend kind:bug priority:p2 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
handsontable/hyperformula#1879 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
RunestoneInteractive/rs#1661 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
capricorn86/happy-dom#2594 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày