[v11] Datepicker: Error when trying to select the year after selecting a date in range mode.

Đang mở
#8,468 7 bình luận 0 reaction 1 người được giao Xem trên GitHub

@Coderxrohan đang làm issue này rồi.

Từ ngày 8/1/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Type: Bug
Describe the bug

The bug is currently reproduceable on your own docs.

Having a date in selected in range mode in the datepicker and clicking on the years throws a typeError:

This is the error stack:

Error caught by Error Boundary: TypeError: s7.getFullYear is not a function
At useDatePicker.ts:289
year DatePicker.style.ts:174
m resolve.ts:4
F2 getKeyValue.ts:13
D useComponentStyle.ts:118
hr DatePickerTableBodyCell.tsx:82
render DatePickerTableBodyCell.tsx:97
React 18
Vt useDatePicker.ts:554
React 26
performWorkUntilDeadline scheduler.development.js:45
js scheduler.development.js:223
js scheduler.development.js:364
__require2 chunk-PLDDJCW6.js:17
js index.js:6
__require2 chunk-PLDDJCW6.js:17
React 2
__require2 chunk-PLDDJCW6.js:17
js React
__require2 chunk-PLDDJCW6.js:17
react-dom_client.js:20192

Reproducer

No response

System Information
It is reproduceable on your own docs.
Steps to reproduce the behavior
  1. Open https://v11.primereact.org/docs/components/datepicker on the Range Example
Image
  1. Select two dates
Image
  1. Click the year
Image
  1. After the click the page breaks
Image
Expected behavior

The page doesn't break and it shows the year picker.

Ngôn ngữ chính
CSS
Star
8.3k
Fork
1.2k
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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của primefaces/primereact

Tất cả issue của primefaces/primereact

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.