javascript - Can't pass html tag into title property -
i'm trying pass in title
property html tag this:
var unavailableperiod = { 'title': ealang['unavailable'] + ' <br><small>' + ((val[i]['notes'].length > 30) ? val[i].substring(0, 30) + '...' : val[i['notes']) + '</small>', 'start': date.parse(val[i]['start_datetime']), 'end': date.parse(val[i]['end_datetime']), 'allday': false, 'color': '#879db4', 'editable': true, 'classname': 'fc-unavailable fc-custom', 'data': val[i], 'column' : column_operator }; $calendar.fullcalendar('renderevent', unavailableperiod, false);
but in visualization displayed this:
i'm using version 2.3.1 of fullcalendar, in past 1.6.1 working perfectly. doing wrong?
they changed html in event.title
escaped. can try injecting html through eventrender
:
var unavailableperiod = { 'title': ealang['unavailable'] + ' ' + ((val[i]['notes'].length > 30) ? val[i].substring(0, 30) + '...' : val[i['notes']), 'titlehtml': ealang['unavailable'] + ' <br><small>' + ((val[i]['notes'].length > 30) ? val[i].substring(0, 30) + '...' : val[i['notes']) + '</small>', ... };
and then:
eventrender: function(event, el) { el.find('.fc-title').html(event.titlehtml); }
Comments
Post a Comment