Open awer000 opened 3 years ago
The clickDayName
click event works only in weekly and daily views.
I plan to develop this feature for monthly views.
Thank you!
@jungeun-cho any updates on this issue / feature request?
@HunselM We're currently working on the tui.calendar
v2 and we considered implementing it, however, It will take time to provide v2 to the users.
It is a little bit of a hack, but you can implement it like this:
@HostListener('click', ['$event'])
public onClick(event: MouseEvent) {
const target = event.target as HTMLElement;
if (target.classList.contains('tui-full-calendar-weekday-grid-date')) {
const monthStart: Date = this.calendar.getDateRangeStart().toDate();
const dayOfMonth = parseInt(target.innerText, 10);
const dateOfMonth = new Date(monthStart.getFullYear(), monthStart.getMonth(), dayOfMonth);
this.calendar.setDate(dateOfMonth);
this.calendar.changeView('day', true);
}
}
It is for angular/typescript but I guess you get the idea.
Summary
I want to click dayname on 'month' view mode like clickDayname too.
Screenshots
I want to give click event dayname on month, then I use 'monthGridHeader' method. but it didn`t satisfied me.
Version
Write the version of the calendar you are currently using.
Additional context
Could you take some tips on this problem? And, I did some PR to toast react calendar. ( https://github.com/nhn/toast-ui.react-calendar/pull/42 , it is not related about this issue.) Thank you!