js-calendar icon indicating copy to clipboard operation
js-calendar copied to clipboard

Activity Move Question

Open emresaracoglu opened this issue 6 years ago • 1 comments

Hi,

If the event is moved to a different date, can ask the user to "Are you sure? "

Thank you

emresaracoglu avatar Jun 07 '18 11:06 emresaracoglu

This should be a feature of your app and not of this library. You can implement it something like this (thought there are probably a few, this is what comes to mind):

calendar.on('dropped', function(cal, event){
	var revert = // y/n from user

	if(revert){
		cal.state.dragging = true;
		cal.state.dragged = event;
		cal.state.newPosition = event.position;
		cal.state.newAt = event.at;

		cal.moveCell(event);
	}
});

calendar.on('cellDidNotMove', function(cal){
	cal.render();
});

fatlard1993 avatar Jan 28 '19 18:01 fatlard1993