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;
scheduler.attachEvent("onClick",allow_own);
scheduler.attachEvent("onDblClick",allow_own);
//Opens details form with single click
scheduler.attachEvent("onClick",
function (id,e) {
scheduler._on_dbl_click(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
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;
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
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.