Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weekDayName isToday is always true #1437

Open
chloekim02 opened this issue Jan 18, 2024 · 0 comments
Open

weekDayName isToday is always true #1437

chloekim02 opened this issue Jan 18, 2024 · 0 comments

Comments

@chloekim02
Copy link

chloekim02 commented Jan 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant