我正在使用fullcalendar和angularJs进行事件调度程序应用程序。 在这里,除了开始时间和结束时间之外,我将全力以赴。 如何在日历中获得开始和结束时间。
var myApp = angular.module('calenderApp', ['ui']);
myApp.controller('calenderCtrl', ['$scope', '$http' ,function($scope, $http)
{
getInfo();
function getInfo()
{
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$scope.uiConfig = {
calendar:{
defaultView: 'agendaDay',
height: 450,
firstDay: 1,
weekends:false,
editable: true,
header:{
left: 'title',
center: 'month',
right: 'today prev,next'
},
ignoreTimezone: false,
dayClick: $scope.alertEventOnClick,
eventDrop: $scope.alertOnDrop,
eventResize: $scope.alertOnResize
}
};
$http.post("http://localhost/AdminLTE-master/sism_crm/route/campaign/campaign/calendar").then(function(response) {
$scope.events = response.data;
var length=response.data.length;
for(var i=0;i<length;i++)
{
$scope.eventSources.push({
idx: response.data[i].idx,
title: response.data[i].title,
description : response.data[i].description,
allDay: true,
start: new Date(response.data[i].start),
end: new Date(response.data[i].end),
startTime: new Date(response.data[i].startTime),
endTime: new Date(response.data[i].endTime),
});
calendar.fullCalendar('refetchEvents');
}
});
}
}]);
如何在calendar.thanks中获取开始时间和结束时间.. !!
答案 0 :(得分:0)