rn-calendar-simple

1.0.8 • Public • Published

react-native-calendar

Test Lint

Peggada

Installation

yarn add rn-calendar-simple
npm install rn-calendar-simple

How use

import { useState } from 'react';
import { Text, View } from 'react-native';
import { Calendar } from 'rn-calendar-simple';

export default function App() {
  const [selectedDate, setSelectedDate] = useState<Date>(new Date());
  return (
    <View>
      <Text>{selectedDate.toLocaleString()}</Text>
      <Calendar value={selectedDate} onChange={setSelectedDate} />
    </View>
  );
}

Props

Prop Type Description
value (optional) Date The calendar value.
onChange (optional) (d: Date) => void The method called when an update is performed.
min (optional) Date The minimum date to be selected.
max (optional) Date The maximum date to be selected.
monthLabel (optional) Array The name of the months.
weekLabel (optional) Array The name of the weeks.

Readme

Keywords

none

Package Sidebar

Install

npm i rn-calendar-simple

Weekly Downloads

12

Version

1.0.8

License

MIT

Unpacked Size

1.08 MB

Total Files

37

Last publish

Collaborators

  • emirdeliz