New event with single click

Is there a way to cause a new event to be created on a single click? Also is there an easy way to do area highlighting (so if hovering over 10-10:30 block on a given day, it will be shaded)?

This is what I currently have which opens an existing event on a single click, but you still have to double click to create a new one.

            scheduler.config.details_on_create = true;
            scheduler.config.details_on_dblclick = true;

            //Opens details form with single click
                function (id,e) {
                    return false;

to do area highlighting
Partially possible for timeline view. Not possible for week|day view for sure.

Is there a way to cause a new event to be created on a single click?
Normally it not possible.
You can try to add the next line of code which will process single clicks as dbl-clicks

scheduler._click.dhx_cal_data = scheduler._on_dbl_click;

Could you let me know how it would be possible in timeline view?

Also, I used scheduler._click.dhx_cal_data = scheduler._on_dbl_click; and got the following error:
this.config is undefined
at line in debug.js: if (this.config.readonly) return;


Check the attached sample.

Color control template may look as

scheduler.templates.timeline_cell_class=function(ev, date, section){ if (date.getHours()>12 && date.getHours()<14) return "red_css"; return ""; }
Method get date and section info and must return css for such cell

To force single click event creation in timeline view

scheduler.attachEvent("onCellClick", function(a,b,c,d,event){ scheduler.dblclick_dhx_matrix_cell(event); }); (52.2 KB)

Hi, I didn’t mean highlighting a section permanently. I meant so that when you hover over a timeslot, that time slot would look slightly different, indicating where your cursor is.

Also, the single click solution doesn’t work for day/week/month view. As I mentioned, scheduler._click.dhx_cal_data = scheduler._on_dbl_click; causes an error…

I have attached a static version of the calendar so you can see the single click error: scheduler2.html file (all the data is in the month of August). Also, I have found a separate problem - some of my events are rendered as overlapping (see August 13th). I’m not sure what is causing this…I have noticed it on other days as well.

Thanks. (185 KB)

scheduler.addEvent(“13-08-2010 00:00”,“13-08-2010 00:00”,"",9443,
One of your event has equal end and start times.

Also, the single click solution doesn’t work
Change it as

scheduler._click.dhx_cal_data = function(e){ scheduler._on_dbl_click(e); };