简体   繁体   English

angular-ui-Calendar中的eventClick无法正常工作

[英]eventClick in angular-ui-Calendar is not working

The UI works fine, the events are displayed correctly, but the only problem is eventClick isn't working. 用户界面工作正常,事件可以正确显示,但是唯一的问题是eventClick无法正常工作。 I thought jQuery needs to be updated to solve this issue, but I was wrong. 我认为需要更新jQuery才能解决此问题,但是我错了。 There is something else which is preventing the eventClick from working! 还有其他原因导致eventClick无法正常工作! Please Help 请帮忙

This is my index.html 这是我的index.html

 <div class="container"> <div ui-calendar='$ctrl.uiConfig.calendar' ng-model="$ctrl.eventSources"> </div> </div> 

this is my controller.js 这是我的controller.js

 (function(){ class CalendarComponent { constructor() { this.eventSources = []; this.uiConfig = { calendar : { editable : true, header : { left : 'prev,next,today', center : 'title', right : 'month,agendaWeek,agendaDay' } }, eventClick: function(event,jsEvent,view){ console.log("holla"); } }; this.eventSources = [ { events: [ {title: "finger painting", start: "2016-07-28T18:00+05:30", location: "SAC middle earth", allDay:false}, {title: "hand painting", start: "2016-07-27T21:30+05:30",location: "CLT", allDay:false} ], color: "red" }, { events: [ {title: "lightmusic", start: "2016-07-29T18:00+05:30", location: "OAT", allDay:false}, {title: "Rock music", start: "2016-07-28T21:30+05:30",location: "SAC middle earth", allDay:false} ], color: "blue" } ]; } } angular.module('sangamApp') .component('calendar', { templateUrl: 'app/calendar/calendar.html', controller: CalendarComponent }); })(); 

尝试将uiConfig对象传递给ui-calendar ,现在eventClick不在传递给该指令的对象内

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 angular-ui-calendar:日历中不显示事件 - angular-ui-calendar : events are not displayed in the calendar Angular-UI-Calendar后期绑定? - Angular-UI-Calendar Late Binding? angular.js未捕获的错误:[ng:areq]参数&#39;fn&#39;不是一个函数,在使用基于angular-ui-calendar的日历小部件时得到了Moment - angular.js Uncaught Error: [ng:areq] Argument 'fn' is not a function, got Moment while working on angular-ui-calendar based calendar widget 在angular-ui日历中,如何在eventClick的“事件”数组中找到事件的索引? - In angular-ui calendar, how can I find index of an event in 'events' array on eventClick? 引导模态不适用于完整日历中的eventClick功能 - Bootstrap modal is not working on eventClick function in Full Calendar 在完整的日历角度 1.x 中打开 eventClick 功能的模态 - Open modal on eventClick function in full calendar angular 1.x 如何使用2个事件点击1个日历? - How to use 2 eventClick on 1 calendar? Angular UI日历/完整日历拖动事件不起作用(编辑)-Chrome - Angular UI Calendar / Full Calendar drag event not working (edit) - in chrome 使用EventClick完整日历返回数据 - Return Data with EventClick Full Calendar javascript FullCalendar eventClick不起作用 - javascript FullCalendar eventClick not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM