Skip to content

Commit cab0fbf

Browse files
committed
Added example project. Removed unnecessary files.
1 parent c69616e commit cab0fbf

File tree

307 files changed

+8581
-20222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

307 files changed

+8581
-20222
lines changed

README.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,51 @@
11
# react-native-date-picker
22

3-
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.
3+
4+
📅 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.
5+
46

57
## Installation
68

7-
`$ yarn add @henninghall/react-native-date-picker`
9+
`yarn add @henninghall/react-native-date-picker`
810

9-
`$ react-native link `
11+
`react-native link `
1012

1113

1214
## Usage
1315

1416
```js
15-
import Picker from '@henninghall/react-native-date-picker';
16-
17-
<Picker
18-
date={new Date()}
19-
onDateChange={(date) => console.log(date)}
20-
style={{ width: 300, height: 210 }}
21-
/>
17+
import React, { Component } from 'react';
18+
import { View, StyleSheet} from 'react-native';
19+
20+
import DatePicker from '@henninghall/react-native-date-picker';
21+
22+
export default class App extends Component {
23+
24+
state = { chosenDate: new Date()}
25+
26+
setDate = (newDate) => this.setState({ chosenDate: newDate })
27+
28+
render() {
29+
return (
30+
<View style={styles.container}>
31+
<DatePicker
32+
date={this.state.chosenDate}
33+
onDateChange={this.setDate}
34+
style={{ width: 300, height: 170 }}
35+
/>
36+
</View>
37+
);
38+
}
39+
}
40+
41+
const styles = StyleSheet.create({
42+
container: {
43+
flex: 1,
44+
alignItems: 'center',
45+
justifyContent: 'center',
46+
backgroundColor: 'white',
47+
},
48+
})
2249

2350
```
51+
-1 Bytes
Binary file not shown.
-18.1 KB
Binary file not shown.
-17 Bytes
Binary file not shown.

android/.idea/codeStyles/Project.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

android/.idea/gradle.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

android/.idea/misc.xml

Lines changed: 0 additions & 34 deletions
This file was deleted.

android/.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

android/.idea/runConfigurations.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)