Jason94
Jason94

Reputation: 13610

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

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"?

Upvotes: 6

Views: 11005

Answers (5)

TV-C-1-5
TV-C-1-5

Reputation: 714

You can use JQUERY and eventRender

eventRender: function(event, element){

element.children(':first-child').text("new text");

},

Upvotes: 0

Piotr Kula
Piotr Kula

Reputation: 9841

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');

Upvotes: 4

lucas teles
lucas teles

Reputation: 720

It works for me:

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

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

Upvotes: 8

user3537367
user3537367

Reputation: 1

In Main.Js, find allDayText="all-day" and replace with allDayText="LOL".

Upvotes: -4

whoabackoff
whoabackoff

Reputation: 1653

This should do it:

$('#calendar').fullCalendar({
    defaultView: 'agendaDay',
    allDayText: 'LOL'
})

Upvotes: 14

Related Questions