Datepicker update value
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
- 38/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
Sử dụng component Datepicker được nêu trong báo cáo làm điểm bắt đầu; trước tiên tái hiện việc thay đổi ngày từ bên ngoài bằng các nút mũi tên và so sánh giá trị prop với giá trị được hiển thị. Được xem là hoàn tất khi picker cập nhật lúc date prop của nó thay đổi, đồng thời hành vi điều hướng hiện có vẫn hoạt động; báo cáo không nêu file hoặc test nào cần chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Steps to reproduce
give datepicker a date, then trying to change outside of the datepicker
Current behavior
Even though the variable date changes, the value inside the datepicker does not change
Expected behavior
Datepicker should show the date that is setted as the current date on the variable
Context
When clicking on the arrows it should go a dar forward or back
I deleted parts of the code that are not relevant so divs might be broken
import { useState } from "react";
import { Datepicker } from "flowbite-react";
const Component= () => {
const [date, setDate] = useState(new Date());
const goBackOneDay = () => {
setDate((prevDate) => {
const newDate = new Date(prevDate);
newDate.setDate(newDate.getDate() - 1);
return newDate;
});
};
const goForwardOneDay = () => {
setDate((prevDate) => {
const newDate = new Date(prevDate);
newDate.setDate(newDate.getDate() + 1);
return newDate;
});
};
const testDate = () => {
console.log(date);
};
return (
<div className="trading-tool grid grid-cols-3 grid-rows-[auto_3fr_1fr] gap-2.5 h-screen bg-gray-800 text-white p-2.5">
{/* Header row for the title and date picker */}
<div className="col-span-3 flex items-center p-2.5 text-lg border-b border-gray-600">
<span>Component</span>
<div className="flex-grow flex justify-center items-center">
<button onClick={goBackOneDay}><</button>
<Datepicker date={date} title="Flowbite Datepicker" />
<button onClick={goForwardOneDay}>></button>
</div>
<button onClick={testDate}>Test</button>
</div>
</div>
);
};
export default Component;
- Ngôn ngữ chính
- TypeScript
- Star
- 2.1k
- Fork
- 502
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 1018 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 42 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ự
-
Report: &TV InternationalĐang mởcheck:passed streams:remove
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority-p1
Độ 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 88/100
-
beginner blocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
hiero-ledger/hiero-sdk-js#4670 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.Đang mởMonthly Not a priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Expensify/App#106080 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày