mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-21 12:21:31 +03:00
Fixed date time issue
This commit is contained in:
parent
e1e2c8f928
commit
fba445c8a9
@ -40,7 +40,7 @@ class DateTimePickerView extends PureComponent {
|
||||
}
|
||||
|
||||
if (date && _value) {
|
||||
const formatedDateTime = new Date(`${date} ${_value}`).toISOString();
|
||||
const formatedDateTime = moment(`${date} ${_value}`, 'YYYY-MM-DD HH:mm').toISOString();
|
||||
onSubmit(formatedDateTime);
|
||||
this._initState();
|
||||
}
|
||||
@ -55,11 +55,11 @@ class DateTimePickerView extends PureComponent {
|
||||
|
||||
if (type === 'date-time') {
|
||||
_type = date ? 'time' : 'date';
|
||||
_format = date ? 'HH:MM' : 'YYYY-MM-DD';
|
||||
_format = date ? 'HH:mm' : 'YYYY-MM-DD';
|
||||
_minDate = date ? null : moment().format('YYYY-MM-DD');
|
||||
} else {
|
||||
_type = type;
|
||||
_format = type === 'date' ? 'YYYY-MM-DD' : 'HH:MM';
|
||||
_format = type === 'date' ? 'YYYY-MM-DD' : 'HH:mm';
|
||||
_minDate = type === 'date' ? moment().format('YYYY-MM-DD') : null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user