I’m using primereact’s calendar component. I have a prop
numberOfMonths={18}
To give me 18 months/columns. Problem with that is that it generated every additional month after 12 with same children element keys, so I get a bunch of these errors:
Warning: Encountered two children with the same key, `8`. Keys should be unique so that components maintain their identity across updates.....
Is there any way around this so that primereact generates additional months with unique keys? Thanks.
This is how my full component with props looks like:
<Calendar value={dates} onChange={(e : CalendarChangeEvent) => verticalDateHandler(e.value)}numberOfMonths={18} minDate={today} selectionMode="range" dateFormat="YYYY MMM DD" touchUI inline viewDate={today}/>
Tried removing "touchUI", tried removing viewDate prop, tried updatingLocale with extra month names. No dice.
2
Answers
Seems to be just a bug with no solution right now.
reported it on GitHub issues
It will be fixed in 9.3.1+ with this fix: https://github.com/primefaces/primereact/pull/4260