Skip to main content

Quick picks

Quick pick(s) are defined as a JSON object (Quick pick(s) attribute). JSON object keys represent the available quick pick labels. Each key is defined as an array with two elements - the start and end of a predefined range. Start and end dates are instances of the Moment.js JavaScript library. To learn more about Moment.js visit its home page.

Example quick picks are shown below

{ 
'Today': [
moment(),
moment()
],
'Yesterday': [
moment().subtract(1, 'days'),
moment().subtract(1, 'days')
],
'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')
]
}