fullcalendar-columns
fullcalendar-columns copied to clipboard
Question for dynamic columns
Hi Michael, i use your fullcalendar-columns extension for a REST and AngularJS project and it´s great.
Do you know a solution or workaround to set the number of columns dynamically with your extension? Or to force fullcalendar not to set left and right? Short explanation: i blend in and out different employees per selection and load their events to fullcalendar. and i calculate the width and left position depending on the amount of employees selected. (Math.floor(100 / $scope.checkedEmployees.length) + '%') But every time fullcalendar ignores this for left (width is ok). Then i find your extension and it´s perfect but i don´t know how to set your numColumns dynamically (initialize: function() {this.numColumns = this.opt('numColumns'); and i tried numColumns: $scope.checkedEmployees.length > 0 ? $scope.checkedEmployees.length : 1 in uiConfig) respectivley to reload if numColumns changes?
Perhaps you have an idea. Best, Ilonka
Hi Ilonka,
I'm glad you like it. Unfortunately, I don't immediately know how to implement this. I also don't have the time currently to look into it. The code is really simple so far, so should be easy to extend though. If you do implement it, I'd be happy to incorporate your changes!
Best, Michael
On 21 July 2015 at 13:47, ilonkalehmann [email protected] wrote:
Hi Michael, i use your fullcalendar-columns extension for a REST and AngularJS project and it´s great.
Do you know a solution or workaround to set the number of columns dynamically with your extension? Or to force fullcalendar not to set left and right? Short explanation: i blend in and out different employees per selection and load their events to fullcalendar. and i calculate the width and left position depending on the amount of employees selected. (Math.floor(100 / $scope.checkedEmployees.length) + '%') But every time fullcalendar ignores this for left (width is ok). Then i find your extension and it´s perfect but i don´t know how to set your numColumns dynamically (initialize: function() {this.numColumns = this.opt('numColumns'); and i tried numColumns: $scope.checkedEmployees.length > 0 ? $scope.checkedEmployees.length : 1 in uiConfig) respectivley to reload if numColumns changes?
Perhaps you have an idea. Best, Ilonka
— Reply to this email directly or view it on GitHub https://github.com/mherrmann/fullcalendar-columns/issues/2.
[image: Inline image 1]
Michael Herrmann, MSc Alser Straße 18/26 1090 Wien Tel.: +43 699 11 65 16 40 Email: [email protected]
@ilonkalehmann - looks like you're using angular wrapper for this - it actually has a watcher for options, so all you need to do is change the numColumns in options, ie. $scope.config.views.multiColAgendaDay.numColumns = $scope.checkedEmployees.length;