Added new date selectors RPS-64

This commit is contained in:
Patrick Fic
2020-11-27 16:27:51 -08:00
parent 4b27a92b8a
commit 382d5c1452
4 changed files with 59 additions and 91 deletions

View File

@@ -36,6 +36,7 @@ export function ReportingDatesMolecule({ queryReportingData }) {
<DatePicker.RangePicker
ranges={{
Today: [moment(), moment()],
"Last 14 days": [moment().subtract(14, "days"), moment()],
"Last 7 days": [moment().subtract(7, "days"), moment()],
"Next 7 days": [moment(), moment().add(7, "days")],
"Next 14 days": [moment(), moment().add(14, "days")],
@@ -51,6 +52,17 @@ export function ReportingDatesMolecule({ queryReportingData }) {
moment().startOf("month").add(1, "month"),
moment().startOf("month").add(1, "month").endOf("month"),
],
"Last Quarter": [
moment().startOf("quarter").subtract(1, "quarters"),
moment().startOf("quarter").subtract(1, "day"),
],
"This Quarter": [
moment().startOf("quarter"),
moment()
.startOf("quarter")
.add(1, "quarter")
.subtract(1, "day"),
],
}}
/>
</Form.Item>