Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions DateTimePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
View,
} from 'react-native';
import Button from 'react-native-osd-simple-button';
import PropTypes from 'prop-types'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a ; at the end of the line to keep up with linting rules please?


const styles = StyleSheet.create({
dateDisplay: {
Expand Down Expand Up @@ -60,22 +61,22 @@ const styles = StyleSheet.create({

export default class DateTimePicker extends Component {
static propTypes = {
date: React.PropTypes.oneOfType([
React.PropTypes.date,
React.PropTypes.string,
date: PropTypes.oneOfType([
PropTypes.date,
PropTypes.string,
]),
iosDoneButtonText: React.PropTypes.string,
iosDoneButtonStyle: Button.propTypes.containerStyle,
iosClosePickerButtonTextContainerStyle: Button.propTypes.textContainerStyle,
iosClosePickerButtonTextStyle: Button.propTypes.textStyle,
label: React.PropTypes.string,
mode: React.PropTypes.oneOf([
iosDoneButtonText: PropTypes.string,
iosDoneButtonStyle: PropTypes.containerStyle,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this would work, I doubt the React PropTypes have a containerStyle type.

I think the Button.propTypes should stay that way, as they are using react-native-osd-simple-button's propTypes

iosClosePickerButtonTextContainerStyle: PropTypes.textContainerStyle,
iosClosePickerButtonTextStyle: PropTypes.textStyle,
label: PropTypes.string,
mode: PropTypes.oneOf([
'datetime',
'date',
'time',
]),
onChange: React.PropTypes.func.isRequired,
renderAndroidButton: React.PropTypes.func,
onChange: PropTypes.func.isRequired,
renderAndroidButton: PropTypes.func,
};

static defaultProps = {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "react-native-osd-datetimepicker",
"version": "1.1.1",
"version": "1.1.3",
"description": "A Datetimepicker for Android and iOs for react-native",
"main": "DateTimePicker.js",
"dependencies": {
"react-native-osd-simple-button": "^1.0.0"
"prop-types": "^15.6.0",
"react-native-osd-simple-button": "https://github.com/truca/react-native-osd-simple-button"
},
"devDependencies": {
"react": "15.0.2",
Expand Down
Loading