themouette/jquery-week-calendar — Issue #111:  how to prevent the event creation for particular date with time slot ?
Author: jmaniv
Created: 2011-12-16 12:08:33+00:00
State: open

thanks for providing wonderful plugin.
Now I want to prevent the event creation for past date/time.
I found "beforeEventNew" in https://github.com/themouette/jquery-week-calendar/pull/99.
Then I just return false from beforeEventNew when today_date is less than new Date(calEvent.start) in demo.js. like

beforeEventNew : function(calEvent, $event) {
var today = new Date();
if (calEvent.start.getTime() < today.getTime()) {
alert(calEvent.start)
//return false;
},

Unfotunetly I couldn't get calEvent.start

how to prevent the event creation for past date and particular slot ?