D
D
Dmitry Gavrilenko2015-10-27 10:17:15
JavaScript
Dmitry Gavrilenko, 2015-10-27 10:17:15

How to control the firing of certain events in the JS library?

I use the jQuery Week Calendar library Good library, everything is as it should be, even more! I use one of the many variations of this library. Options to configure here
When you click on a free area, a new event is created. How to catch this event and prevent the creation of an object in the calendar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2015-10-27
@Maddox

Maybe the allowEventCreation setting will suit you? Specify false to disable the creation of new events.
If not, then the beforeEventNew event will do:
$('#calendar').weekCalendar({
...
beforeEventNew: function(event, data) { return false; },
...
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question