Refactoring
This commit is contained in:
parent
0a593d20d0
commit
2118f9e212
1 changed files with 6 additions and 7 deletions
|
|
@ -130,14 +130,13 @@ class Datetimepicker extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
let funcDate = this.handleDateChange;
|
|
||||||
let datepicker = $(this.refs.datepicker).datetimepicker({
|
let datepicker = $(this.refs.datepicker).datetimepicker({
|
||||||
format: 'yyyy-mm-dd hh:ii:00',
|
format: 'yyyy-mm-dd hh:ii:00',
|
||||||
autoclose: true,
|
autoclose: true,
|
||||||
todayBtn: true,
|
todayBtn: true,
|
||||||
});
|
});
|
||||||
datepicker.on('changeDate', function(e) {
|
datepicker.on('changeDate', (e) => {
|
||||||
funcDate(e);
|
this.handleDateChange(e);
|
||||||
});
|
});
|
||||||
$(this.refs.datepicker_input).datetimepicker('remove');
|
$(this.refs.datepicker_input).datetimepicker('remove');
|
||||||
this.markDateField();
|
this.markDateField();
|
||||||
|
|
@ -420,10 +419,10 @@ class Logs extends React.Component {
|
||||||
this.earlier_than = this.props.recording.start;
|
this.earlier_than = this.props.recording.start;
|
||||||
}
|
}
|
||||||
this.getLogs();
|
this.getLogs();
|
||||||
}
|
if (this.props.curTs) {
|
||||||
if (this.props.curTs) {
|
const ts = this.props.curTs;
|
||||||
const ts = this.props.curTs;
|
this.loadForTs(ts);
|
||||||
this.loadForTs(ts);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue