Display more Text in fullcalendar

后端 未结 9 879
一整个雨季
一整个雨季 2020-12-12 09:45

I am looking for a solution to display more information in event.

For example in the DayView you see a event from 06:00 to 10:00.
I want to display a additio

9条回答
  •  情深已故
    2020-12-12 10:12

    With the modification of a single line you could alter the fullcalendar.js script to allow a line break and put multiple information on the same line.

    In FullCalendar.js on line ~3922 find htmlEscape(s) function and add .replace(//g, '
    ') to the end of it.

    function htmlEscape(s) {
        return s.replace(/&/g, '&')
        .replace(//g, '>')
        .replace(/'/g, ''')
        .replace(/"/g, '"')
        .replace(/\n/g, '
    ') .replace(/<br\s?\/?>/g, '
    '); }

    This will allow you to have multiple lines for the title, separating the information. Example replace the event.title with title: 'All Day Event' + '
    ' + 'Other Description'

提交回复
热议问题