diff --git a/README.md b/README.md index 193b018..73b482f 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,51 @@ # react-native-date-picker -A cross platform date picker component for React Native. This component uses the default DatePickerIOS on iOS and a custom picker on Android which has similar look and feel. + +📅 React Native Date Picker is a date picker component for React Native working on iOS and Android. It uses the default DatePickerIOS on iOS and a custom picker on Android which has similar look and feel. + ## Installation -`$ yarn add @henninghall/react-native-date-picker` +`yarn add @henninghall/react-native-date-picker` -`$ react-native link ` +`react-native link ` ## Usage ```js -import Picker from '@henninghall/react-native-date-picker'; - - console.log(date)} - style={{ width: 300, height: 210 }} -/> +import React, { Component } from 'react'; +import { View, StyleSheet} from 'react-native'; + +import DatePicker from '@henninghall/react-native-date-picker'; + +export default class App extends Component { + + state = { chosenDate: new Date()} + + setDate = (newDate) => this.setState({ chosenDate: newDate }) + + render() { + return ( + + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + backgroundColor: 'white', + }, +}) ``` + diff --git a/android/.gradle/4.4/fileChanges/last-build.bin b/android/.gradle/4.4/fileChanges/last-build.bin deleted file mode 100644 index f76dd23..0000000 Binary files a/android/.gradle/4.4/fileChanges/last-build.bin and /dev/null differ diff --git a/android/.gradle/4.4/fileHashes/fileHashes.bin b/android/.gradle/4.4/fileHashes/fileHashes.bin deleted file mode 100644 index 3ba994e..0000000 Binary files a/android/.gradle/4.4/fileHashes/fileHashes.bin and /dev/null differ diff --git a/android/.gradle/4.4/fileHashes/fileHashes.lock b/android/.gradle/4.4/fileHashes/fileHashes.lock deleted file mode 100644 index 1d9bca1..0000000 Binary files a/android/.gradle/4.4/fileHashes/fileHashes.lock and /dev/null differ diff --git a/android/.idea/codeStyles/Project.xml b/android/.idea/codeStyles/Project.xml deleted file mode 100644 index 30aa626..0000000 --- a/android/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml deleted file mode 100644 index 76a4349..0000000 --- a/android/.idea/gradle.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml deleted file mode 100644 index bb6e25a..0000000 --- a/android/.idea/misc.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/android/.idea/modules.xml b/android/.idea/modules.xml deleted file mode 100644 index e54e28e..0000000 --- a/android/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/android/.idea/runConfigurations.xml b/android/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/android/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/.idea/workspace.xml b/android/.idea/workspace.xml deleted file mode 100644 index 1c0fa56..0000000 --- a/android/.idea/workspace.xml +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -