You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the datepicker and so far everything is going according to the plan, except for a small thing:
The holidays overlay text is outputting an extra comma.
Here is the code so far:
constholidaysObj=[{date: '2024/01/30',holidayName: 'Fim de Mês'},{date: '2024/01/30',holidayName: 'Fim de Mês 2'},{date: '2024/01/31',holidayName: 'Emenda Fim do Mês'},{date: '2024/02/12',holidayName: 'Dia Dos Namorados'},{date: '2024/04/13',holidayName: 'Páscoa'},{date: '2024/05/01',holidayName: 'Dia do Trabalho'},{date: '2024/06/15',holidayName: 'Corpus Christi'},{date: '2024/06/16',holidayName: 'Emenda Corpus Christi'},]<DatePickerclassName="rounded-sm border-[1px] border-gray-950 text-center"filterDate={isWeekday}showPopperArrow={false}selected={boolStartDate ? startDate : null}onChange={(date: Date)=>handleChange(date)}formatWeekDay={(nameOfDay: any)=>nameOfDay.slice(0,1)}excludeDates={excludeDays}holidays={holidaysObj}maxDate={newDate('2024/07/15')}placeholderText="mm/dd/yy"dateFormat="MM/dd/yy"/>
And here is the result I'm having:
I tried running the code on different PCs and got the same result. The only time I got a different result was when I used Vite to create the project, instead of NextJS, and with Vite it works perfectly, so I am wondering if there is any incompatibility with NextJS for this case.
I tried searching for other discussions about this subject but found nothing, if anyone could help me I'd be very grateful!
Thanks in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone!
I'm trying to use the datepicker and so far everything is going according to the plan, except for a small thing:
The holidays overlay text is outputting an extra comma.
Here is the code so far:
And here is the result I'm having:
I tried running the code on different PCs and got the same result. The only time I got a different result was when I used Vite to create the project, instead of NextJS, and with Vite it works perfectly, so I am wondering if there is any incompatibility with NextJS for this case.
I tried searching for other discussions about this subject but found nothing, if anyone could help me I'd be very grateful!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions