Open sharankasandula opened 7 years ago
I have the same problem...Have you solved the problem yet?
thanks a lot! I got a solution yet~
Can you share the solution here in this thread so that it helps others as well. Also, I am curious as to how I you did it.
you need to create function for select before init the calendar config. Example :
$scope.select = function (start, end, allDay){
console.log('Select ' + start, end);
}
/* config object */
$scope.uiConfig = {
calendar:{
header: {
left: '',
center: '',
right: ''
},
eventClick: $scope.alertOnEventClick,
eventDrop: $scope.alertOnDrop,
eventResize: $scope.alertOnResize,
eventRender: $scope.eventRender,
selectable: true,
selectHelper: true,
select: $scope.select,
firstDay:0,
defaultView: 'agendaWeek',
columnFormat: 'dddd',
editable: false,
allDaySlot:false,
events: []
}
};
So I have spent quite a lot of time getting this thing to work.
The ui-calendar repo does not have "select" mothod. i.e, to make a selection to create an event, according to the Full calendar documentation - select (method)
As of now the selection functionality works, except that the event is not created with a single click. Its created only when the user clicks and drags. Did anyone else have this problem as well? I don't have
dayClick()
function in case you are wondering.Here's my
select()
function.function select (start,end,jsEvent,view){ startTime = start; $scope.endTime = end; $scope.events.push({ start: $scope.startTime, end: $scope.endTime, className: ['Booking'], overlap: false, allDay : false, 'timeDifference' : timeDiff, 'eventPrice' : eventPrice }); }
Also, the
selectMinDistance
doesn't seem to work. Can someone help me with this? Thanks