rn-calendar-simple
1.0.8 • Public • Published
yarn add rn-calendar-simple
npm install rn-calendar-simple
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>
);
}
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
nonePackage Sidebar
Install
Weekly Downloads