ui-calendar icon indicating copy to clipboard operation
ui-calendar copied to clipboard

Custom buttons in config not showing in calendar

Open rdeslonde opened this issue 10 years ago • 7 comments

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 } };

rdeslonde avatar Sep 24 '15 22:09 rdeslonde

Funny. I just tried this myself and am also not seeing the custom button render.

ldeavila avatar Sep 24 '15 22:09 ldeavila

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!

ldeavila avatar Sep 24 '15 22:09 ldeavila

Interesting. Thanks Ideavila! Let me know if you see any issues.

rdeslonde avatar Sep 24 '15 22:09 rdeslonde

I guess the question here then would be when does the team plan on upgrading this to 2.4 of fullcalendar?

rdeslonde avatar Sep 24 '15 23:09 rdeslonde

^ Updated to latest version. All good.

amaanr avatar Nov 30 '15 03:11 amaanr

Update fullcalendar to 2.4.0 works great. If you are using bower, try:

bower install fullcalendar#2.4.0 --save

leocaseiro avatar Dec 07 '15 22:12 leocaseiro

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"
  }

migvill avatar Jan 19 '16 17:01 migvill