Fix datrangepicker for "Today" and "Yesterday". Add "All Time" option. (#535)

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2017-06-30 17:04:10 +02:00
committed by GitHub
parent d89b611b2c
commit 76e4cc6a40
2 changed files with 12 additions and 8 deletions

View File

@@ -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