Units as default Day View


#1

Is there a way to make the default Day View show the units view?

So when i’m in a month view or week view and I click on the day number/date for the day i want it to to take me to the units view for that day instead of the day view?

Thanks
Justin


#2

Hi @jwilliquor,
when the onEmptyClick fires, you can go to the Units view via setCurrentView method:

scheduler.setCurrentView(new Date(date), "unit");

Here is a related sample:
https://snippet.dhtmlx.com/5/c1aefd042


#3

I already have other tasks assigned to empty click. I need it to goto the unit view when you click the day number that has the day view link behind it now.

Or the day name on the week view


#4

Hi @jwilliquor,
unfortunately, there is no built-in method to set a new view by clicking on the element. You can try to get the DOM elements by querySelector and using setCurrentView method go to the Unit view.


#5

Hi @jwilliquor,
Sorry, due to a misunderstanding, I gave you an incorrect answer. In order to go to the certain view by clicking the date please try to use active_link_view config. Please. attach the dhtmlxscheduler_active_links.js extension to your app:
https://docs.dhtmlx.com/scheduler/extensions_list.html#activelinks

Here is a related sample:
https://docs.dhtmlx.com/scheduler/samples/03_extensions/06_links_plugin.html


#6

Hi @jwilliquor,
in addition, here is the sample of how to go to Units view by clicking the dates via active_link_view :
http://snippet.dhtmlx.com/5/47b839f3d