Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Moved to @react-native-community pickers BREAKING CHANGE * Bump version BREAKING CHANGE: bumping to 8.0.0 * docs: Added v8 info * docs: Update README.md * docs: Update README.md * docs: Update README.md * Update README.md * docs: Update README.md * fix: Fixed modal styling (#306) * fix: Updated TypeScript definitions for v8.0.0 (#307) * Updated dependencies * Fix: Wrong version bump * v8.0.1 * fix: Use getDate() instead of getDay() * v8.0.2 * Type custom components in props as React.ComponentType / PropTypes.elementType (#314) * v8.0.3 * fix: Rename onModalHide to onHide Modal prop to make onHide callback work on iOS (#316) * Export TS interface * v8.0.4 * Mentioned Expo instructions in the README.md * feat: Added custom component types (#336) * v8.0.5 * fix: Fix hiding header on IOS not working (#339) * v8.0.6 * Set the library version to 8.x.x for Expo setup (#342) It would probably makes things easier for people migrating from version 7. Co-authored-by: Michiel De Mey <de.mey.michiel@gmail.com> Co-authored-by: Christiaan van Bemmel <github@cvbemmel.nl> Co-authored-by: Alexey Bulavka <bulavka.aleksey@gmail.com> Co-authored-by: Simonas Gildutis <simonasgildutis@gmail.com> Co-authored-by: Phillip-Cognativ <46981284+Phillip-Cognativ@users.noreply.github.com> Co-authored-by: Victor Goya <goya.victor@gmail.com>
- Loading branch information
1 parent
01443a6
commit d894a83
Showing
43 changed files
with
4,100 additions
and
7,930 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,7 @@ workflows: | |
- tests | ||
filters: | ||
branches: | ||
only: master | ||
only: | ||
- master | ||
- next | ||
- next-major |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": ["plugin:react-app/recommended"] | ||
"extends": ["plugin:react-app/recommended", "plugin:prettier/recommended"] | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,6 @@ android/keystores/debug.keystore | |
.vscode | ||
jsconfig.json | ||
npm-debug.log.* | ||
|
||
# yarn | ||
yarn-error.log |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,3 +54,6 @@ buck-out/ | |
|
||
# Bundle artifact | ||
*.jsbundle | ||
|
||
# CocoaPods | ||
/ios/Pods/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,47 @@ | ||
import React, { Component } from "react"; | ||
import { Button, StyleSheet, Text, View } from "react-native"; | ||
import DateTimePicker from "react-native-modal-datetime-picker"; | ||
|
||
export default class DateTimePickerTester extends Component { | ||
state = { | ||
isDateTimePickerVisible: false, | ||
selectedDate: "" | ||
import React, { useState } from "react"; | ||
import { Button, StyleSheet, View } from "react-native"; | ||
import DateTimePickerModal from "react-native-modal-datetime-picker"; | ||
|
||
const App = () => { | ||
const [pickerMode, setPickerMode] = useState(null); | ||
|
||
const showDatePicker = () => { | ||
setPickerMode("date"); | ||
}; | ||
|
||
showDateTimePicker = () => { | ||
this.setState({ isDateTimePickerVisible: true }); | ||
const showTimePicker = () => { | ||
setPickerMode("time"); | ||
}; | ||
|
||
hideDateTimePicker = () => { | ||
this.setState({ isDateTimePickerVisible: false }); | ||
const hidePicker = () => { | ||
setPickerMode(null); | ||
}; | ||
|
||
handleDatePicked = date => { | ||
this.setState({ selectedDate: date.toString() }); | ||
this.hideDateTimePicker(); | ||
const handleConfirm = date => { | ||
console.warn("A date has been picked: ", date); | ||
hidePicker(); | ||
}; | ||
|
||
render() { | ||
const { isDateTimePickerVisible, selectedDate } = this.state; | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<Button title="Show DatePicker" onPress={this.showDateTimePicker} /> | ||
<Text style={styles.text}>{selectedDate}</Text> | ||
<DateTimePicker | ||
isVisible={isDateTimePickerVisible} | ||
onConfirm={this.handleDatePicked} | ||
onCancel={this.hideDateTimePicker} | ||
/> | ||
</View> | ||
); | ||
} | ||
} | ||
return ( | ||
<View style={style.root}> | ||
<Button title="Show Date Picker" onPress={showDatePicker} /> | ||
<Button title="Show Time Picker" onPress={showTimePicker} /> | ||
<DateTimePickerModal | ||
isVisible={pickerMode !== null} | ||
mode={pickerMode} | ||
onConfirm={handleConfirm} | ||
onCancel={hidePicker} | ||
/> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
const style = StyleSheet.create({ | ||
root: { | ||
flex: 1, | ||
justifyContent: "center", | ||
alignItems: "center" | ||
}, | ||
text: { | ||
marginVertical: 10 | ||
} | ||
}); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip |
Oops, something went wrong.