Hi, I would like to grab the selected range label ("This Month", "Last Month") of the daterangepicker on change. Is this possible? Currently I have
DateRangePicker::create(
[
"name" => "dateRange",
"maxDate" => date("Y-m-d h:i:s"),
"format" => "MM/DD/YYYY",
"options" => [
"opens" => 'right',
"showDropdowns" => FALSE,
"showCustomRangeLabel" => FALSE,
"alwaysShowCalendars" => TRUE,
],
"ranges" => [
"Today" => DateRangePicker::today(),
"Yesterday" => DateRangePicker::yesterday(),
"Last 7 days" => DateRangePicker::last7days(),
"Last 30 days" => DateRangePicker::last30days(),
"This month" => DateRangePicker::thisMonth(),
"Last month" => DateRangePicker::lastMonth(),
"This year" => DateRangePicker::thisYear(),
"Last year" => DateRangePicker::lastYear(),
"All Time" => DateRangePicker::allTime(),
],
"clientEvents"=>array(
"change"=>"function(e){
console.log("get currently selected range....");
}",
)
]
);