PrimeReact Schedule Localization

UI Components for React
Post Reply
i.poyda
Posts: 1
Joined: 16 Feb 2018, 15:20

16 Feb 2018, 15:34

Hello!
We are using Avalon theme for our application and I'm trying to make a localization for schedule.

<Schedule id="eventsScheduler"
allDaySlot={false}
locale={{locale: 'de'}}
header={scheduleHeader}
defaultView={'agendaWeek'}
events={this.state.scheduleEvents}/>

at my index.html file I've put scripts

<script src='%PUBLIC_URL%/assets/js/jquery.min.js'></script>
<script src='%PUBLIC_URL%/assets/js/moment.min.js'></script>
<script src='%PUBLIC_URL%/assets/js/fullcalendar.min.js'></script>
<script src='%PUBLIC_URL%/assets/js/locale-all.js'></script>

but Schedule component seems ignored this because there were no any error message at browser console, and en locale was set.

For testing I've executed

jQuery('#eventsScheduler').fullCalendar({
locale: 'de'
});

from browser console and as a result it rendered a fullcalendar (without any theme customization) with correct localization.

Could you please check if I've made something wrong?

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

26 Feb 2018, 14:32

Please use like (please import in your.js file) ;

Code: Select all

import 'your_path/fullcalendar/dist/locale/de'

<Schedule id="eventsScheduler"
allDaySlot={false}
locale={{locale: 'de'}}
header={scheduleHeader}
defaultView={'agendaWeek'}
events={this.state.scheduleEvents}/>

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests