Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mmazzarolo authored Feb 22, 2017
1 parent 4581490 commit e214932
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ This library is available on npm, install it with: `npm install --save react-nat

## Usage
```javascript
import React, { Component } from 'react'
import { Text, TouchableOpacity, View } from 'react-native'
import DateTimePicker from 'react-native-modal-datetime-picker'
import React, { Component } from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import DateTimePicker from 'react-native-modal-datetime-picker';

export default class DateTimePickerTester extends Component {
state = {
isDateTimePickerVisible: false
}
isDateTimePickerVisible: false,
};

_showDateTimePicker = () => this.setState({ isDateTimePickerVisible: true })
_showDateTimePicker = () => this.setState({ isDateTimePickerVisible: true });

_hideDateTimePicker = () => this.setState({ isDateTimePickerVisible: false })
_hideDateTimePicker = () => this.setState({ isDateTimePickerVisible: false });

_handleDatePicked = (date) => {
console.log('A date has been picked: ', date)
this._hideDateTimePicker()
}
console.log('A date has been picked: ', date);
this._hideDateTimePicker();
};

render () {
return (
Expand All @@ -48,7 +48,7 @@ export default class DateTimePickerTester extends Component {
onCancel={this._hideDateTimePicker}
/>
</View>
)
);
}

}
Expand Down

0 comments on commit e214932

Please sign in to comment.