Page 1 of 1

[REACT] There is a way to configure the navigation to day in YearView?

Posted: Mon May 29, 2023 2:41 pm
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


Re: [REACT] There is a way to configure the navigation to day in YearView?

Posted: Mon May 29, 2023 4:51 pm
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


Re: [REACT] There is a way to configure the navigation to day in YearView?

Posted: Mon May 29, 2023 7:06 pm
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.


Re: [REACT] There is a way to configure the navigation to day in YearView?

Posted: Tue May 30, 2023 6:35 am
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


Re: [REACT] There is a way to configure the navigation to day in YearView?

Posted: Tue May 30, 2023 5:25 pm
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?


Re: [REACT] There is a way to configure the navigation to day in YearView?

Posted: Tue May 30, 2023 6:54 pm
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;
        }
    }