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

Aperta
#8,468 7 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@Coderxrohan ci sta già lavorando.

Dal 8/1/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
CSS
Stelle
8.3k
Fork
1.2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di primefaces/primereact

Tutte le issue di primefaces/primereact

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.