Package Exports
- react-native-calendarview-datepicker
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-calendarview-datepicker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React-native-calendarview-datepicker
📦 Installation
npm i react-native-calendarview-datepicker
or
yarn add react-native-calendarview-datepicker
🚀 Basic Usage
You can simply add date-picker as follows. It shows minimal default calendar picker. But you can customize as you wish.
import DatePickerCalendar from 'react-native-calendarview-datepicker';
import Moment from 'moment';
...
const App = () => {
const [date, setDate] = useState(moment());
return (
<DatePickerCalendar date={date} onChange={(selectedDate) => setDate(selectedDate)}/>
);
};
📑 API Reference
Props | Type | Description |
---|---|---|
date | Moment |
moment() Moment date object (Required) |
onChange | Function |
Callback triggered on date select (Required) |
headerStyles | Object |
Header wrapper styles |
customHeader | Function |
Function should return a component. Args: (date, month, year, setMonth, setYear) |
weekHeaderTextColor | String |
Week days names text color |
selectedDateHighlightColor | String |
Selected date highlight marker color |
selectedDateHighlightRadius | Number |
Selected date highlight marker radius |
datesColor | String |
Calendar date color |
selectedDateColor | String |
Selected calendar date color |
fieldButtonStylesDateFormat | String |
Selected date showing format. Available formats |
fieldButtonStyles | Object |
Field button styles |
fieldButtonTextStyles | Object |
Field button text styles |
🗞 License
React-native-calendarview-datepicker is licensed under the MIT License