diff --git a/docs/assets/DatePickerIOS/example.gif b/docs/assets/DatePickerIOS/example.gif new file mode 100644 index 00000000000..3ed4e2fb7cb Binary files /dev/null and b/docs/assets/DatePickerIOS/example.gif differ diff --git a/docs/assets/DatePickerIOS/maximumDate.gif b/docs/assets/DatePickerIOS/maximumDate.gif new file mode 100644 index 00000000000..2839bfc4d8c Binary files /dev/null and b/docs/assets/DatePickerIOS/maximumDate.gif differ diff --git a/docs/assets/DatePickerIOS/minuteInterval.png b/docs/assets/DatePickerIOS/minuteInterval.png new file mode 100644 index 00000000000..be6efbdbd40 Binary files /dev/null and b/docs/assets/DatePickerIOS/minuteInterval.png differ diff --git a/docs/assets/DatePickerIOS/mode.png b/docs/assets/DatePickerIOS/mode.png new file mode 100644 index 00000000000..99e68367eca Binary files /dev/null and b/docs/assets/DatePickerIOS/mode.png differ diff --git a/docs/assets/KeyboardAvoidingView/example.gif b/docs/assets/KeyboardAvoidingView/example.gif new file mode 100644 index 00000000000..caf378eccc6 Binary files /dev/null and b/docs/assets/KeyboardAvoidingView/example.gif differ diff --git a/docs/next/datepickerios.html b/docs/next/datepickerios.html index 8dbf70b8882..ed6ce3dbcbc 100644 --- a/docs/next/datepickerios.html +++ b/docs/next/datepickerios.html @@ -9,6 +9,46 @@ a controlled component, so you must hook in to the onDateChange cal and update the date prop in order for the component to update, otherwise the user's change will be reverted immediately to reflect props.date as the source of truth.

+

Example

+
import React, { Component } from 'react'
+import {
+  DatePickerIOS,
+  View,
+  StyleSheet,
+} from 'react-native'
+
+export default class App extends Component {
+  constructor(props) {
+    super(props);
+    this.state = { chosenDate: new Date() };
+
+    this.setDate = this.setDate.bind(this);
+  }
+
+  setDate(newDate) {
+    this.setState({chosenDate: newDate})
+  }
+
+  render() {
+    return (
+      <View style={styles.container}>
+        <DatePickerIOS
+          date={this.state.chosenDate}
+          onDateChange={this.setDate}
+        />
+      </View>
+    )
+  }
+}
+
+const styles = StyleSheet.create({
+  container: {
+    flex: 1,
+    justifyContent: 'center'
+  },
+})
+
+

Props