Page 1 of 1
					
				Remove (child) from CGCalendar month view
				Posted: Wed Apr 24, 2019 3:00 pm
				by baldguy
				CMSMS 2.2.10, CGCalendar 2.6, CGExtensions 1.62.3, CGSimpleSmarty 2.2.1
Using the "CGCalendar FullCalendar View Sample" layout to display a month grid-style calendar.  For recurring events, the parent event is listed as:
My Event (repeats)
and the children of that event all display as:
My Event (Child)
Is there a way to remove the '(repeats)' and '(Child)' part of the event name?
			 
			
					
				Re: Remove (child) from CGCalendar month view
				Posted: Wed Apr 24, 2019 3:07 pm
				by calguy1000
				No, appending that text is hardcoded at this time.
you would have to use javascript to hide it.  Perhaps the fullCalender eventRender method would do it.
			 
			
					
				Re: Remove (child) from CGCalendar month view
				Posted: Wed Apr 24, 2019 3:21 pm
				by baldguy
				Thanks, Calguy.  I'll play around with it and see what I can figure out.
			 
			
					
				Re: Remove (child) from CGCalendar month view
				Posted: Mon Jun 17, 2019 1:26 pm
				by AccentAvondschool
				@baldguy
I'm still reviewing all new functions and while setting up the new calendar overview I've encountered the same problem.
The following works for us ...
Code: Select all
eventAfterRender: function(event, element, view) {
    var txt = $(element, 'fc-event-title').text().replace('(Child)', '').replace('(repeats)', '');
    //console.log(txt);
    $(element, 'fc-event-title').text(txt);
},
It does depend on which view you are in.
 
			
					
				Re: Remove (child) from CGCalendar month view
				Posted: Tue Jun 18, 2019 8:22 am
				by AccentAvondschool
				The eventAfterRender was not really necessary but I could no longer edit the previous post. The following works for us in two views (table and list form):
Code: Select all
eventRender: function(event, element, view) {
    if (view.name == 'month') {
        var txt = $(element, 'fc-event-title').text().replace('(Child)', '').replace('(repeats)', '');
        $(element, 'fc-event-title').text(txt);
    }
    if (view.name == 'listMonth') {
        var txt = $(element, 'fc-event-title').html().replace('(Child)', '').replace('(repeats)', '');
        $(element, 'fc-event-title').html(txt);
    }
},