weekDayName isToday is always true
chloekim02 opened this issue · 0 comments
chloekim02 commented
Current Behavior
<Calendar
week={{
taskView: false,
eventView: ['time'],
}}
ref={calendarRef}
view={viewType}
events={initialEvents}
isReadOnly
usageStatistics={false}
onClickEvent={onClickEvent}
template={{
weekDayName: (model) => {
const { dayName, date, isToday } = model;
return `<div>${dayName}</div><div class=${isToday ? 'today' : 'date'}>${date}</div>`;
},
timegridDisplayPrimaryTime: (date) => {
const time = date.time.getTime();
return `<div class='display-time'>${moment(time).format('LT')}</div>`;
},
}}
/>
I want to add class name when it's today but when I log isToday it's always true.
Expected Behavior
it should be true when it's only today