Pregunta

I think this is a bug. I setup the names (in italian) of days:

dayNames:['Domenica','Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato']

The name is shown correctly in the header of dayView but not in the subheader. enter image description here

Does anybody know why?

¿Fue útil?

Solución

Same problem. I solved by changing the function "htmlEscape" in file fullcalendar.js I add:

.replace(/ì/g, 'ì')

the function now work correctly for me (i need the italian language in my application), but you must add the character to correctly encod in the day names

function htmlEscape(s) {
    return (s + '').replace(/&/g, '&')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/'/g, '&#039;')
        .replace(/"/g, '&quot;')
        .replace(/ì/g, '&igrave;')
        .replace(/\n/g, '<br />');
}

Otros consejos

Way simpler: Add <meta charset="utf-8"> to the <head> of your html file

I tried the htmlEscape function modified by user3514257 but I found an error.

This is my function:

function htmlEscape(s) {
    return (s + '').replace(/ì/g, '&igrave;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;')
        .replace(/'/g, '&#039;')
        .replace(/"/g, '&quot;')
        .replace(/&/g, '&amp;')
        .replace(/\n/g, '<br />');
}

I change the first line with the ì line because the & character did not allow recognizing of &igrave;

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top