2 events creating while releasing the mouse button in crome

Hi,

I am trying to create the new event through dragging and resizing the event but when i release the mouse button there 2 events created this is happened in chrome browser and also the mouse click position event is not proper.




Hello,
this does not seems to happen in our examples. Please provide a some kind of demo, so we could inspect the problem

Hi,

Sorry for not mention the point, I added some code for creating event on single mouse click that is creating the problem please have a look the code

var setter = scheduler._click.dhx_cal_data;

		scheduler._click.dhx_cal_data = function(e) {
		
			if (!scheduler._locate_event(e ? e.target : event.srcElement)) {
				scheduler._on_dbl_click(e || event);
			}
			setter.apply(this, arguments);
		};

can you help me on this issue or provide some other relevant code for creating event on single mouse click.

Thnks

Hi,
try using onEmptyClick event, it triggers when user clicks on empty space in the data area of the calendar and shouldn’t interfere with built-in handlers

scheduler.attachEvent("onEmptyClick", function (date, e){ scheduler.addEventNow({ text: "New event" start_date: new Date(date), end_date: scheduler.date.add(date, scheduler.config.time_step, "minute") }); //or scheduler.addEvent });
docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … ntnow.html
docs.dhtmlx.com/scheduler/api__s … event.html

Hi,

Its working fine now… thanks for the quick response… :slight_smile:

One more thing, i have to implemented checkbox with week dates header in week view as well as Day view and also get the checked checkbox value.

is this possible… pls help…

Hi,
do you mean you need to put a checkbox in the header of week and day views?
If so, you may customize week_date and day_date templates. They returns date label that are displayed in calendar header, you can add any html string to the template output

docs.dhtmlx.com/scheduler/api__s … plate.html
docs.dhtmlx.com/scheduler/api__s … plate.html

Thanks for the reply,

I find it… :slight_smile: