The start time is changed to the beginning of last month and the end time is changed to the end of last month

pull/17/head
YangZhang-GitHub 2021-03-12 11:56:23 +08:00
parent a0be801275
commit cd38309ce0
1 changed files with 2 additions and 2 deletions

View File

@ -50,8 +50,8 @@ const EnergyFlowDiagram = ({ setRedirect, setRedirectUrl, t }) => {
// Query Parameters
const [energyFlowDiagramList, setEnergyFlowDiagramList] = useState([]);
const [selectedEnergyFlowDiagram, setSelectedEnergyFlowDiagram] = useState(undefined);
const [reportingPeriodBeginsDatetime, setReportingPeriodBeginsDatetime] = useState(current_moment.clone().startOf('month'));
const [reportingPeriodEndsDatetime, setReportingPeriodEndsDatetime] = useState(current_moment);
const [reportingPeriodBeginsDatetime, setReportingPeriodBeginsDatetime] = useState(current_moment.clone().subtract(1, 'months').startOf('month'));
const [reportingPeriodEndsDatetime, setReportingPeriodEndsDatetime] = useState(current_moment.clone().subtract(1, 'months').endOf('month'));
const { isDark } = useContext(AppContext);
// buttons