Customization Queries

Hello everyone,

Am looking at making some additional customization in terms of displaying additional information.

For example, I added a new field in the Lightbox called category. Under Category there are selections like Family, Friends, Work and so on.

First questions, is there a way I can display on maybe the header or footer or somewhere else on the page the total number of hours for Friends. So if I have 5 events with category : Friends of 2 hours each. It would display 10 hours.

Second question, I have a new field in the lighbox called duration. Currently it is a text field that I enter the amount of hours the event is. Is there a way I can make that field auto populate the duration based on the start and end date of the event?

Any assistance provided is greatly appreciated.

Best regards,

Andrew

Hello,

Scheduler provides an API for basic operations, like retrieve all events, or retrieve all events from the date range:
docs.dhtmlx.com/scheduler/api__s … vents.html

If you want to display some summary info, you’ll have to manually calculate it and display on the page. I.e. you can add a footer or header using html, and trace API events of the scheduler that fires when data is changed.
In the handler you recalculate target values and update text in your header and footer
Related events:
docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … event.html

You need either to defien a custom control that will calculate it’s value as diff between start and end date, or precalculate this value in onBeforeLigthbox event, e.g.

[code]scheduler.attachEvent(“onBeforeLightbox”, function (id){
var ev = scheduler.getEvent(id);
ev.duration = Math.floor( (ev.end_date - ev.start_date) / (10006060));

return true;

});
[/code]
docs.dhtmlx.com/scheduler/api__s … event.html