Categories | Question details Back To List | ||||||||
DHTMLX Scheduler: Events Is it possible to alter the behavior of the Add\Edit functionality on the DHTMLX Scheduler control to open a dialog window instead of leveraging the built-in edit mode? Is it possible to add\remove\change behavior of the buttons which appear on the left side of an event when it is selected? For cases where the calendar is for an abstract date range, such that the days should read "Day 1, Day 2, Day 3..." instead of any particular real date, what would be the recommended approach to achieve this effect using the DHTMLX Scheduler control? Answer posted on Jun 29, 2009 06:57 >>instead of leveraging the built-in edit mode? scheduler.config.details_on_create = true; scheduler.config.details_on_dblclick = true; >>Is it possible to add\remove\change behavior of the buttons They defined as scheduler.config.icons_edit=["icon_save","icon_cancel"]; scheduler.config.icons_select=["icon_details","icon_edit","icon_delete"]; You can redefine them in any necessary way. Adding custom values will create a custom buttons scheduler.config.icons_edit=["icon_save","icon_cancel","icon_custom1"] scheduler.locale.labels.icon_custom1 = "my text"; scheduler._click.buttons.custom1=function(){ //do something } <style> div.icon_custom1{ background-image:url(imgs/some.gif); } </style> >>For cases where the calendar is for an abstract date range You can define template for scale generation scheduler.templates.week_scale_date = function(date_object){ var n = some_magic_here(date_object); return "Day "+n; } You can use scheduler._min_date to get start of scale function some_magic_here(date){ return Math.floor((date.valueOf()-scheduler._min_date.valueOf())/(60*60*24*1000)); } Answer posted by Tom on Jun 29, 2009 11:33 It seems like week_scale_date can only be set after init and then requires a subsiquent call to setCurrentView to force the calendar to display using the new scale. Is this expected or is there a way to set the week template's date scale before init to eliminate the dupicate call. (If I try to set week_scale_date before init I get "scheduler.templates is undefined"). Thanks! -Tom Answer posted by Support on Jun 30, 2009 01:44 >>Is this expected Yes, in current version templates can be redefined only after scheduler initialization ( during initialization, scheduler generate default templates based on configuration ) - it will be updated in next version , to allow redefining in any time ( before or after initialization ) Answer posted by Tom on Jul 04, 2009 09:08 In the latest version I have, "scheduler.config.details_on_dblclick = true;" works but "scheduler.config.details_on_create = true;" does not. When double clicking to create a new event, the native in-line editor still opens instead of the light box. Answer posted by Support on Jul 06, 2009 01:57 Regression was confirmed and fixed Updated js file is attached to the post. Attachments (1)
|