I would like to add/remove some icons in the edit bar. Is there a recommended approach for this?
Thanks,
Will
I would like to add/remove some icons in the edit bar. Is there a recommended approach for this?
Thanks,
Will
Hello,
scheduler.config.icons_edit = ["icon_save", "icon_cancel"];
scheduler.config.icons_select = ["icon_details", "icon_edit", "icon_delete"];
You can add your own icon there and then style in the same way as existing ones.
Kind regards,
Ilya
Awesome, thanks.
I presume that I can do the following:
# in js
scheduler.config.icons_select = ['icon_details', 'icon_start', 'icon_delete'];
scheduler.config.labels.icon_start = 'Start';
# in css
div.icon_start { background: ...; }
How would I add a click behavior to the icon_start icon?
Like this?
$(document).on('click', '.icon_start', function() {
// behavior here
})
Or is there a way in DHTMLX’s library to bind a function to an icon?
I dug around a little and found this. I’m not sure if this is recommended or not. If there’s a better way, I’d love to hear it.
scheduler._click.buttons.start = function(id) { alert(id) }
Thanks,
Will
Yep, assigning through scheduler._click.buttons is the expected use-case
Somehow we have missed this info in the documentation
I cant get any value about labels when I use console.dir(scheduler.config.labels);
Hi,
labels are stored in scheduler.locale object
console.log(scheduler.locale.labels.icon_details)