0

I'm creating a website that using primefaces and jsf for my customer. I used schedule component in my project. Everything look good until my customer tell me that they want to change icon of prev/next button into text such as "Previous"/"Next". Moreover they also want to display full date time (included day of month). How can I do that?

thanks

Vikash Pandey
  • 5,407
  • 6
  • 41
  • 42
Xiao King
  • 369
  • 1
  • 13

1 Answers1

0

You need to add a JavaScript code to specify the labels on primefaces schedule component, then import the code on the page of p:schedule, for example i am modifying the language to french, just put locale="fr" in schedule, this is my code :

PrimeFaces.locales ['fr'] = {
    closeText: 'Fermer',
    prevText: 'Précédent',
    nextText: 'Suivant',
    monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
    monthNamesShort: ['Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc'],
    dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
     .....
};

You can change the labels however you like

Bilal Dekar
  • 3,200
  • 4
  • 28
  • 53
  • #Billy I have added before I created question but it not working. MonthNames, monthNamesShort.... change but prevText and nextText not display. – Xiao King Oct 06 '16 at 08:11