support icon indicating copy to clipboard operation
support copied to clipboard

Create ScheduleTooltip feature for Calendar

Open ExtAnimal opened this issue 3 years ago • 3 comments

Forum post

Month and Year, and CalendarRow have one day time granularity, so a Date can be shown.

DayView has time level granularity, so we can use https://www.bryntum.com/docs/calendar/api/Calendar/widget/DayView#config-increment to show the hovered time.

ExtAnimal avatar Sep 24 '22 14:09 ExtAnimal

Also requested here: https://www.bryntum.com/forum/viewtopic.php?f=44&t=22656

Still not much suggestion on what to show and when. Mouseover a day on a month view doesn't need much explaining by default.

ExtAnimal avatar Oct 26 '22 19:10 ExtAnimal

And here: https://forum.bryntum.com/viewtopic.php?p=152098#p152098

ExtAnimal avatar Aug 06 '24 05:08 ExtAnimal

Should be as simple as

new Tooltip({
    forElement               : calendar.viewContainer.element,
    allowOver                : true,
    hoverDelay               : 0,
    hideDelay                : 100,
    forSelector              : '*',
    showOnHover              : true,
    trackMouse               : true,
    updateContentOnMouseMove : true,
    filterTarget(target) {
        return target.closest('.b-cal-event-wrap') ? null : target;
    },
    getHtml({ event }) {
        const
            { activeView } = calendar,
            dateTime       = activeView.getDateFromPosition(event.clientX, event.clientY);

        if (dateTime) {
            return DateHelper.format(dateTime, `${activeView.dateFormat} ${activeView.timeFormat || 'LST'}`);
        }
    }
});

But maybe forSelector should be allowed to be a filtering function, so that programmatic filtering out of targets could be easier.

This would greatly simplify the tortured forSelectors in various tooltip Features.

ExtAnimal avatar Aug 06 '24 06:08 ExtAnimal