mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Fix datrangepicker for "Today" and "Yesterday". Add "All Time" option. (#535)
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -29,12 +29,14 @@ $(function () {
|
||||
timePicker: true, timePickerIncrement: 15,
|
||||
locale: { format: "MMMM Do YYYY, h:mm A" },
|
||||
ranges: {
|
||||
"Today": [moment(), moment()],
|
||||
"Yesterday": [moment().subtract(1, "days"), moment().subtract(1, "days")],
|
||||
"Today": [moment().startOf("day"), moment()],
|
||||
"Yesterday": [moment().subtract(1, "days").startOf("day"), moment().subtract(1, "days").endOf("day")],
|
||||
"Last 7 Days": [moment().subtract(6, "days"), moment()],
|
||||
"Last 30 Days": [moment().subtract(29, "days"), moment()],
|
||||
"This Month": [moment().startOf("month"), moment().endOf("month")],
|
||||
"Last Month": [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")]
|
||||
"This Month": [moment().startOf("month"), moment()],
|
||||
"Last Month": [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")],
|
||||
"This Year": [moment().startOf("year"), moment()],
|
||||
"All Time": [moment(0), moment()]
|
||||
},
|
||||
startDate: start__, endDate: end__,
|
||||
"opens": "center", "showDropdowns": true
|
||||
|
||||
Reference in New Issue
Block a user