How to use the react-native-week-view.addLocale function in react-native-week-view

To help you get started, we’ve selected a few react-native-week-view examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hoangnm / react-native-week-view / example / App.js View on Github external
 * Sample React Native App
 * @format

import React, { Component } from 'react';
import {
} from 'react-native';
import WeekView, { addLocale } from 'react-native-week-view';

addLocale('fr', {
  months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),

export default class App extends Component {
  selectedDate = new Date();

  generateDates = (hours, minutes) => {
    const date = new Date();
    date.setHours(date.getHours() + hours);
    if (minutes != null) {
    return date;


Week View Calendar for React Native

Latest version published 8 days ago

Package Health Score

73 / 100
Full package analysis

Popular react-native-week-view functions