Open ChristianSteu opened 9 years ago
@ChristianSteu Thank you soo much!!! Way too long I was trying to figure this out.
can you specify what changes exactly need to be made? I just got this calendar, and have no idea how it was working before this functions breaking change
I changed the line above (in the current version it is line number 229) from
var calendarSettings = attrs.uiCalendar ? scope.$eval(attrs.uiCalendar) : {},
back to
var calendarSettings = attrs.uiCalendar ? scope.$parent.$eval(attrs.uiCalendar) : {},
(and as noted avobe, I also dropped the curly braces while passing the config object).
I haven't encountered any strange behaviour going with these reverted code, though I don't know why the change was made in the first place.
Thank You for the quick reply! =) Will try it out.
Had the same problem after the update. Spent half a day trying to find the bug O.o Thanks @ChristianSteu !
Thank you! I couldn't get eventClick to respond no matter what I tried, thought I was going crazy.
Any PR to fix this issue? It realy is a problem with the new directive and this workaround fixed it.
I was using the solution: <div ui-calendar="{{configObject}}" but then no callback was fired! changing line 299 fixed it. Thank you
I might look into doing a PR, but I'm pretty new to GitHub and have basically no clue how to make one ;-).
Also before just reverting the change, I kinda would like to know the reason why the change was made in the first place - maybe there is a valid reason for the change and we need another solution. (Especially since it is/was a breaking change in the config param syntax).
Maybe the project's main contributor, @jkurz / @joshkurz, could explain why the change was made?
The weird thing for me was that the calendar respected the 'editable' flag in the configuration, but none of the event triggers were working. I changed the line 229 and it worked! whew
This should be fixed now. This https://github.com/angular-ui/ui-calendar/commit/b0ec1762f6ea9bf393638c13e62dc3da247bcdd1 was the root cause. It removed the $parent.eval from the evaluation of the config object. I changed the demo as well to not use interpolation on the config as it should be just evaluated straight from the scope.
I recently updated to the new version of of ui-calendar and I can't proberly pass the config object any more.
I changed my old code from
to
according to the changes made to the demo on github. (My configObject is attached to a controller and is accessed via controllarAs Syntax, but I think that shouldn't be relevant here.)
The problem is that the new way of passing the config object doesn't forward functions I assigned to it:
The calendarSettings object created in getOptions() via
doesn't have a property eventDataTransform at all (other properties are working fine).
Changing the calendarSettings back to access $parent (and dropping the {{}} from the directive) makes it working fine again.