added date picker for schedule

This commit is contained in:
u-e 2019-04-11 23:12:50 +03:00
parent 6def0dd3eb
commit c28668f94e
4 changed files with 9457 additions and 10 deletions

10
.vscode/settings.json vendored
View File

@ -1,10 +0,0 @@
{
"prettier.eslintIntegration": true,
"editor.formatOnSave": true,
"editor.snippetSuggestions": "top",
"explorer.confirmDelete": false,
"window.zoomLevel": 0,
"prettier.printWidth": 100,
"prettier.singleQuote": true,
"prettier.trailingComma": "all"
}

View File

@ -44,6 +44,7 @@
"react-native-actionsheet": "^2.4.2",
"react-native-code-push": "^5.5.2",
"react-native-config": "^0.11.5",
"react-native-datepicker": "^1.7.2",
"react-native-extended-stylesheet": "^0.10.0",
"react-native-fast-image": "^4.0.14",
"react-native-html-renderer": "^1.0.0",

View File

@ -3,6 +3,7 @@ import {
View, Text, ActivityIndicator, SafeAreaView,
} from 'react-native';
import { injectIntl } from 'react-intl';
import DatePicker from 'react-native-datepicker';
// Components
import { TextButton } from '../..';
@ -25,6 +26,7 @@ class BasicHeaderView extends Component {
super(props);
this.state = {
isInputVisible: false,
date: '2016-05-15',
};
}
@ -181,6 +183,44 @@ class BasicHeaderView extends Component {
iconType="MaterialIcons"
name="timer"
/> */}
<DatePicker
// style={{ width: 200 }}
date={this.state.date}
mode="date"
placeholder="select date"
format="YYYY-MM-DD"
minDate="2018-05-01"
maxDate="3000-06-01"
confirmBtnText="Confirm"
cancelBtnText="Cancel"
onDateChange={(date) => { this.setState({ date }); }}
hideText
customStyles={{
dateIcon: {
position: 'absolute',
left: 0,
top: 4,
marginLeft: 0,
},
dateInput: {
marginLeft: 36,
height: 10,
width: 10,
backgroundColor: '#cbcbcb',
},
// ... You can check the source to find the other keys.
}}
iconComponent={(
<IconButton
style={styles.iconButton}
iconStyle={styles.rightIcon}
size={20}
iconType="MaterialIcons"
name="timer"
/>
)}
/>
<IconButton
style={styles.iconButton}
size={25}

9416
yarn.lock Normal file

File diff suppressed because it is too large Load Diff