Our powerful JS Calendar component


Post by bluecraziness1 »

I am trying to change the navigation by clicking on the day cell in the year view.

Expectation:
When I double click, go to the day in day view, even if the cell has events or not.

Thanks


Post by marcio »

Hey,

You can achieve that, you can use the following event listener

listeners : {
        scheduleDblClick : ({ source }) => {
            source.calendar.modes.day.show();
        }
    }

https://bryntum.com/products/calendar/docs/api/Calendar/widget/DayView#function-show
https://bryntum.com/products/calendar/docs/api/Calendar/view/Calendar#event-scheduleDblClick

Best regards,
Márcio


Post by Animal »

Probably simply configuring the YearView with overflowPopup : null should lead to that happening.

If that doesn’t work, it certainly should be made to work.


Post by Animal »

Indeed it seems this doesn't work, so here's the ticket for that small fix: https://github.com/bryntum/support/issues/6871


Post by bluecraziness1 »

Thanks, but i'm still having a problem, the approach suggested by @marcio doesn't work in yearView because when i click in a day without event, this action moves me to the day clicked (dayView).

How i can stop this go to day event with only 1 click?


Post by marcio »

Hey bluecraziness1,

You can use the https://bryntum.com/products/calendar/docs/api/Calendar/view/Calendar#event-dayNumberClick event and return false to avoid changing the view.

listeners : {
        dayNumberClick : (eventData) => {
            console.log('dayNumberClick', eventData);
            return false;
        }
    }

Best regards,
Márcio


Post Reply