mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-11 06:51:23 +03:00
init date time picker component
This commit is contained in:
parent
4d7dfdb488
commit
55dd497fd0
@ -194,7 +194,7 @@ class BasicHeaderView extends Component {
|
||||
<DatePicker
|
||||
style={{ width: 50 }}
|
||||
date={datePickerValue}
|
||||
mode="date"
|
||||
mode={datePickerValue ? 'time' : 'date'}
|
||||
format="YYYY-MM-DD"
|
||||
minDate={moment()}
|
||||
maxDate="3000-06-01"
|
||||
|
22
src/components/dateTimePicker/view/dateTimePickerView.js
Normal file
22
src/components/dateTimePicker/view/dateTimePickerView.js
Normal file
@ -0,0 +1,22 @@
|
||||
import React, { useState } from 'react';
|
||||
import { View } from 'react-native';
|
||||
|
||||
// Styles
|
||||
import styles from './dateTimePickerStyles';
|
||||
|
||||
const DateTimePickerView = (props) => {
|
||||
const {
|
||||
type,
|
||||
isChecked,
|
||||
onSubmit,
|
||||
} = props;
|
||||
|
||||
const [date, setDate] = useState('');
|
||||
const [time, setTime] = useState('');
|
||||
|
||||
return (
|
||||
<View />
|
||||
);
|
||||
};
|
||||
|
||||
export default DateTimePickerView;
|
@ -2,6 +2,7 @@ import api from '../../config/api';
|
||||
import searchApi from '../../config/search';
|
||||
import imageApi from '../../config/imageApi';
|
||||
import serverList from '../../config/serverListApi';
|
||||
import { jsonStringify } from '../../utils/jsonUtils';
|
||||
|
||||
export const getCurrencyRate = currency => api.get(`/currencyRate/${currency.toUpperCase()}/steem`).then(resp => resp.data);
|
||||
|
||||
|
@ -132,13 +132,15 @@ class EditorContainer extends Component {
|
||||
} else {
|
||||
await getDraftPost(username)
|
||||
.then((result) => {
|
||||
this.setState({
|
||||
draftPost: {
|
||||
body: result.body,
|
||||
title: result.title,
|
||||
tags: result.tags.split(','),
|
||||
},
|
||||
});
|
||||
if (result) {
|
||||
this.setState({
|
||||
draftPost: {
|
||||
body: result.body,
|
||||
title: result.title,
|
||||
tags: result.tags.split(','),
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user