angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 728 forks source link

REFRESH CALENDAR #412

Open EmmanuelKzsky opened 8 years ago

EmmanuelKzsky commented 8 years ago

hi , i have a little issue .

By default i set in the config slot duration on agendaday '00:30:00' and all is ok.

But now im searching how i can change the slot duration and refresh the calendar .

Im using

uiCalendarConfig.calendars['myCalendarDay'].fullCalendar('render')

but i dont have any response the calendar still same

Anyone know how i can solve this?

noizbuster commented 8 years ago

for refresh I use

uiCalendarConfig.calendars[calendar].fullCalendar('refetchEvents');

It works for me but, I'm not sure it is proper way

NicoJuicy commented 8 years ago

I do it also, don't forget to set the attribute in your html, eg.

 <div calendar="calendar" ui-calendar="uiConfig.calendar" class="span8 calendar" ng-model="eventSources"></div>

And then ( for example)

uiCalendarConfig.calendars['calendar'].fullCalendar('refetchEvents');

@zirius666 Please close the issue if it's okay

adithya-krishna commented 8 years ago

Hi,

I'm facing a similar problem. but even if i dynamically change the uiConfig object and re-render the calendar as mentioned above, the slotDuration doesnt update.

This is the code i use to update the config object. $scope.uiConfig.slotDuration = "00:15:00";

This, to re-render the calendar $scope.reRenderCalender = function (calendar) {if (uiCalendarConfig.calendars[calendar]) { uiCalendarConfig.calendars[calendar].fullCalendar('refetchEvents');}}; $scope.reRenderCalender("appointmentCal");

I fetch all my events using server calls. Don't know if that could be an issue.

Mario-Boss commented 7 years ago

I think it must be a bug.. I have mentioned about it here.

any solution ?