Skip to content

Commit

Permalink
update readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandima committed Jun 21, 2021
1 parent dc53dae commit c733a81
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,49 @@

A simple React Native date range picker component

---

### Installing:

```
npm install rnv-date-range-picker
yarn add rnv-date-range-picker
```

![screen shot](https://raw.githubusercontent.com/dilipchandima/rnv-date-range-picker/master/screen.png)

---

## Sample React Native Code

```js
import React, { useState } from "react";
import { SafeAreaView, StyleSheet, View, Text } from "react-native";
import { DateRangePicker } from "rn-date-range-picker";

const App = () => {
const [selectedRange, setRange] = useState({});
return (
<SafeAreaView>
<View style={styles.container}>
<DateRangePicker
onSelectDateRange={(range) => {
setRange(range);
}}
responseFormat="YYYY-MM-DD"
/>
<Text>first date: {selectedRange.firstDate}</Text>
<Text>second date: {selectedRange.secondDate}</Text>
</View>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
container: {
margin: 50,
},
});

export default App;
```
Binary file modified screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c733a81

Please sign in to comment.