Closed naveencasp closed 7 years ago
how can i disable the previous dates upto current date in ui-calendar ? can someone help me?
Add the following line to your configuration:
eventClick: $scope.eventClick
Then create a new function.
$scope.eventClick = function (eventData, jsEvent, view) { // If it's in the present or future, run the click action. if (moment(eventData.startTime).diff(moment()) >= 0) { foo(eventData); } };
hi, i tried bt am not getting any response .can u tell me the exact file name where i hv to add that code
care to elaborate which context you would like to disable previous days/ranges in :] ?
There are several possibilities for this, for example if you want to prevent people from adding events in the past, you can set a constraint object on your event ( or if you're using event sources, you can configure the event source for this )
http://fullcalendar.io/docs/event_ui/eventConstraint/