Has anyone gotten dhtmlxScheduler_v5.1.6 to load in a phpmaker customer generated form?I’m able to get it to display but, have to remove the <?php include_once "header.php" ?> line.
if you leave it, the module does not load, just a blank page…can you provide the syntax if you’ve gotten it to work withing the framework
here’s the calendar code if your interested:
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.prevent_cache = true;
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"location", height:43, type:"textarea", map_to:"details" },
{name:"time", height:72, type:"time", map_to:"auto"}
];
scheduler.templates.tooltip_date_format=scheduler.date.date_to_str("%l %M %d, %Y %h:%i %A");
scheduler.locale.labels.section_location="Location";
scheduler.setLoadMode("week")
scheduler.config.xml_date="%Y-%m-%d %h:%i";
scheduler.config.hour_date="%h:%i %A";
scheduler.config.prevent_cache = true;
scheduler.config.multi_day = true;
scheduler.config.occurrence_timestamp_in_utc = true;
scheduler.config.include_end_by = true;
scheduler.config.repeat_precise = true;
scheduler.config.first_hour = 6;
scheduler.config.limit_time_select = true;
scheduler.config.details_on_create=false;
scheduler.config.details_on_dblclick=false;
scheduler.config.event_duration = 60; //specify event duration in munites for auto end time
scheduler.config.auto_end_date = true;
scheduler.config.agenda_start = Date.now();
scheduler.config.agenda_end = Date.now();
scheduler.init('scheduler_here',new Date(),"month");
scheduler.setLoadMode("day")
scheduler.load("/library/dhtmlScheduler/events.php");
var dp = new dataProcessor("/library/dhtmlScheduler/events.php");
dp.init(scheduler);
scheduler.templates.event_class=function(start, end, event){
var css = "";
if(event.rec_type) // if event has subject property then special class should be assigned
css += "event_" + event.rec_type;
if(event.id == scheduler.getState().select_id)
css += " selected";
/*
Note that it is possible to create more complex checks
events with the same properties could have different CSS classes depending on the current view:
var mode = scheduler.getState().mode;
if(mode == "day"){
// custom logic here
}
else {
// custom logic here
}
*/
return css; // default return
};
scheduler.attachEvent("onBeforeDrag",function (event_id) {
// return this.getEvent(event_id).readonly;
return true;
});
scheduler.attachEvent("onClick", function (event_id) {
// return this.getEvent(event_id).readonly;
return true;
});
scheduler.attachEvent("onBeforeLightbox", function (event_id){
return true;
});
scheduler.attachEvent("onEventCancel", function(event_id, is_new_event){
// Called after pressing cancel button in Details form
return true;
});
scheduler.attachEvent("onEventCreated", function(event_id, event_object){
return true;
});
scheduler.attachEvent("onEventAdded", function(event_id, event_object){
return true;
});
scheduler.attachEvent("onBeforeEventChanged", function(event_object, native_event, is_new){
return true;
});
scheduler.attachEvent("onEventChanged", function(event_id, event_object){
return true;
});
scheduler.attachEvent("onEventDeleted", function(event_id,event_object){
return true;
});
scheduler.attachEvent("onBeforeEventDelete", function(event_id){
return true;
});
scheduler.attachEvent("onDblClick", function (event_id, native_event_object){
return true;
});
scheduler.attachEvent("onEventSave",function(id, data, is_new_event){
return true;
})
}