小编ssg*_*ssg的帖子

切换月份和行显示时的ui-calendar问题

我正在使用ui-calendar v:1.0.1,fullcalendar v:2.4.0,

有我的问题:当我在日历中的几个月之间切换时,所有这些都消失了.我做了一项研究,发现从angular-ui-calendar 279行修改calendar.js

eventsWatcher.onAdded = function(event) {
calendar.fullCalendar('renderEvent', event, (event.stick ? true : false));
};
Run Code Online (Sandbox Code Playgroud)

对于

eventsWatcher.onAdded = function(event) {
calendar.fullCalendar('renderEvent', event, (event.stick ? true : false));
};
Run Code Online (Sandbox Code Playgroud)

诀窍.但我正在寻找更好的解决方案.

我对日历的2º问题是,有时它不能正确渲染线条,当我改变窗口的尺寸时,会出现一些线条而其他线条会消失.

现在是代码.

<div class="col-lg-8">
      <h3 class="section-subheading text-muted"></h3>
      <div ui-calendar="uiConfig.calendar" class="span8 calendar" ng-model="eventSources"></div>
</div>
Run Code Online (Sandbox Code Playgroud)

和控制器.

angular.module('lararraizApp')
.controller('EventoCtrl', function ($scope, Evento, uiCalendarConfig, $q) {


$scope.eventos = Evento.query();
$scope.eventSources=[[]];
/*    Evento.query({}, function(response) {
  angular.forEach(response, function(evento){
    $scope.eventSources.push({
      id: evento.id,
      title: evento.name,
      start: evento.fecha,
      allDay: true
    });
  });
});*/

Evento.query().$promise.then(function(res){
  angular.forEach(res, function(evento){
    $scope.eventSources[0].push({
      id: …
Run Code Online (Sandbox Code Playgroud)

javascript calendar fullcalendar angularjs angular-ui

0
推荐指数
1
解决办法
888
查看次数