Resolved date searching issues that would include an extra day RPS-72
This commit is contained in:
@@ -34,6 +34,7 @@ export function ReportingDatesMolecule({ queryReportingData }) {
|
||||
rules={[{ type: "array", required: true }]}
|
||||
>
|
||||
<DatePicker.RangePicker
|
||||
format="YYYY-MM-DD"
|
||||
ranges={{
|
||||
Today: [moment(), moment()],
|
||||
"Last 14 days": [moment().subtract(14, "days"), moment()],
|
||||
|
||||
@@ -28,7 +28,10 @@ export function* onQueryReportData() {
|
||||
export function* queryReportingData({ payload: { startDate, endDate } }) {
|
||||
const result = yield client.query({
|
||||
query: REPORTING_GET_JOBS,
|
||||
variables: { startDate, endDate },
|
||||
variables: {
|
||||
startDate: startDate.format("YYYY-MM-DD"),
|
||||
endDate: endDate.format("YYYY-MM-DD"),
|
||||
},
|
||||
});
|
||||
if (result.errors) {
|
||||
log.error("Error fetching report data.", result.errors);
|
||||
|
||||
Reference in New Issue
Block a user