using emberjs didInsertElement to display two seperate calendars or two instances a jquery fullcalendar plugin object

痞子三分冷 提交于 2019-12-08 02:21:50

问题


I have a single calendar object displaying fine using jquery fullcalendar and emberjs. However, i need to display a separate second calendar or another jquery fullcalendar instance but the second calendar has so far failed to display. Here is fiddle showing it: http://jsfiddle.net/uUWqf/4/. You will see in the fiddle that i tried calling didInsertElement: function() {} twice, but it still only displaying one calendar. However, when i use jquery fullcalendar without emberjs, the two separate calendars are displayed: http://jsfiddle.net/CH4qa/2/.

Is there a way to get this to work.

Thanks for helping.


回答1:


I made a fork of your fiddle that renders two calendars. http://jsfiddle.net/duHfN/7/

In general, you will have better luck using templates to instantiate views rather than creating view instances and calling append on them. There were a number of other issues with the fiddle, some which I cleaned up.



来源:https://stackoverflow.com/questions/11218108/using-emberjs-didinsertelement-to-display-two-seperate-calendars-or-two-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!