How can I modify my code to display events from a database on an mwl calendar based on the saved date rather than showing all events for today only? I want to show events based on the notifyDate field in the database. Can someone help me with this?
html
<mwl-calendar
events="events"
view="calendarView"
current-day="viewDate"
view-title="calendarTitle"
ng-model="eventSources"
cell-is-open="cellIsOpen"
day-view-start="06:00"
day-view-end="22:59"
day-view-split="30"
cell-modifier="modifyCell(calendarCell)"
cell-auto-open-disabled="true"
on-timespan-click="timespanClicked(calendarDate)">
</mwl-calendar>
controller
$scope.myevents = function(start, end, timezone, callback) {
SalesNotifyService.getAllNotify().success(function(data) {
$scope.events = [];
angular.forEach(data,function(event,key){
$scope.events.push({
employeeName: event.employeeName,
notifyDate: event.notifyDate,
});
});
callback($scope.events);
});
}
$scope.eventSources = [$scope.events,$scope.myevents];
I am looking for assistance on how to update my code so that the events displayed on the calendar are based on the notifyDate stored in the database rather than being limited to today's date.