Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do i replace "all-day" text in dayview?

Tags:

fullcalendar

I've tried to put allDayText: 'LOL', into the var defaults without any success, right after the header.

Does someone know where to but it if i want "LOL" instead of "all-day"?

like image 616
Jason94 Avatar asked May 23 '11 06:05

Jason94


3 Answers

This should do it:

$('#calendar').fullCalendar({
    defaultView: 'agendaDay',
    allDayText: 'LOL'
})
like image 143
whoabackoff Avatar answered Nov 02 '22 12:11

whoabackoff


It works for me:

$('#calendar').fullCalendar({
    allDayText: 'XXXXX'
})

Advice: Never change the full-calendar.js file. Set up something in your script.

like image 31
lucas teles Avatar answered Nov 02 '22 11:11

lucas teles


As pointed out in the comments, you should use the Answer linked in comments which is higher voted than mine and does not require editing the source JavaScript.


If you open the fullCalendar.js and look at the very first sections of the file there is something tagged as

//locale

there you will find something like

buttonText: {
    prev: ' ◄ ',
    next: ' ► ',
    prevYear: ' << ',
    nextYear: ' >> ',
    today: 'today',
    month: 'month',
    week: 'week',
    day: 'day'
},

Change the today to

today: 'LOL!',

et viola!

If you want to change the text dynamically from the client side use the jquery like this

$('.fc-button-today span span').html('lollllll');
like image 4
Piotr Kula Avatar answered Nov 02 '22 13:11

Piotr Kula