1.0.3 • Published 3 years ago
react-native-date-picker-by-week v1.0.3
react-native-date-picker-by-week
The date picker by week component for react-native.
Table of Contents
Installation
The component required date-fns library
npm install --save date-fnsnpm install --save react-native-date-picker-by-weekBasic usage
import DatePicker from "react-native-date-picker-by-week";
export default function App() {
const [date, setDate] = useState(new Date());
return (
<View style={styles.container}>
<DatePicker
date={date}
setDate={setDate}
currDateDay={"#000000"}
currDayDate={"#000000"}
remainingDays={"#adadad"}
remainingDates={"#a8a8a8"}
selectedDateBackground={"#400D51"}
selectedDay={"#400D51"}
selectedDate={"#FFE9A0"}
/>
</View>
);
}Props
| Prop Name | Type | Default | Description | |
|---|---|---|---|---|
| date | String | Required | State variable for date | |
| setDate | String | Required | UseState for the the date variable | |
| currDateDay | String | Required | Color for Current Day Text | |
| currDayDate | String | Required | Color for Current Date Text | |
| remainingDays | String | Required | Color for Remaining Days Text | |
| remainingDates | String | Required | Color for Remaining Dates Text | |
| selectedDateBackground | String | Required | Background color for Selected Day | |
| selectedDay | String | Required | Color for Selected Day Text | |
| selectedDate | String | Required | Color for Selected Date Text |
Contributors
Made with contrib.rocks.