Open rdeslonde opened 8 years ago
Funny. I just tried this myself and am also not seeing the custom button render.
Looks like custom buttons are a feature of the 2.4 version of fullcalendar. angular-ui-calendar installs version 2.3.1. Had to uninstall the version of fullcalendar installed by angular-ui-calendar and manually install fullcalendar.
bower uninstall fullcalendar
bower install fullcalendar --save
Not sure if there will be incompatibilities. We will see!
Interesting. Thanks Ideavila! Let me know if you see any issues.
I guess the question here then would be when does the team plan on upgrading this to 2.4 of fullcalendar?
^ Updated to latest version. All good.
Update fullcalendar to 2.4.0 works great. If you are using bower, try:
bower install fullcalendar#2.4.0 --save
I created a PR for this issue. For now do the above solution of adding as a dependency. And also add it to resolutions to resolve any conflicts
"dependencies": {
"angular-ui-calendar": "1.0.1",
"fullcalendar": "2.6.0"
},
"resolutions": {
"fullcalendar": "2.6.0"
}
Per the fullcalendar documentation (http://fullcalendar.io/docs/display/customButtons/) you can add buttons in the config. However trying this with their example doesn't work in the angular config.
Here's my config. Everything works except the custom button doesn't show up.
vm.uiConfig = { calendar: { editable: true, customButtons: { myCustomButton: { text: 'custom!', click: function() { alert('clicked the custom button!'); } } }, header: { left: 'month,agendaWeek,agendaDay prev,next today myCustomButton', center: 'title', right: 'subscribe' }, theme: false, eventSources: vm.eventSources, eventClick: vm.eventClick, dayClick: vm.dayClick } };