You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First and foremost, thank you @dangrossman for all the effort you've put into this and for sharing it. It's been working wonderfully and we're very close to having it work 100% the way we need it.
Question:
We're using preset ranges (eg. last year, last 2 years, etc. etc.) and noticed that whenever a preset range is selected, and subsequently the daterangepicker is selected so that the calendars are shown, Custom Range is selected on the left, instead of the preset selection that was last clicked (i.e. it shows 'Custom Range' instead of 'last year' etc.).
Trying to set showCustomRangeLabel:false hides the Custom Range label from the preset range list, but how do we get the last selected range to be highlighted on the left hand list when showing the daterangepicker?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First and foremost, thank you @dangrossman for all the effort you've put into this and for sharing it. It's been working wonderfully and we're very close to having it work 100% the way we need it.
Question:
We're using preset ranges (eg. last year, last 2 years, etc. etc.) and noticed that whenever a preset range is selected, and subsequently the daterangepicker is selected so that the calendars are shown,
Custom Range
is selected on the left, instead of the preset selection that was last clicked (i.e. it shows 'Custom Range' instead of 'last year' etc.).Trying to set
showCustomRangeLabel:false
hides theCustom Range
label from the preset range list, but how do we get the last selected range to be highlighted on the left hand list when showing the daterangepicker?Thanks in advance.
`$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
linkedCalendars: false,
showDropdowns: true,
showCustomRangeLabel:false,
ranges: {
'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')],
'Last 6 Months': [moment().subtract(6, 'months'), moment()],
'Last Year': [moment().subtract(1, 'year'), moment()],
'Last 2 Years': [moment().subtract(2, 'years'), moment()],
'Last 5 Years': [moment().subtract(5, 'years'), moment()],
'Reset': [moment().subtract(20, 'years'), moment()]
},
}, cb);`
Beta Was this translation helpful? Give feedback.
All reactions