hey @a11! You almost had it! I’ve only moved the dispatched event into the function where the dates are logged into the console.
The code below worked for me but do test it some more on your end
function (start, end, label) {
$('#date-from').val(start.format('MMM DD YYYY HH:mm')).trigger('input');
$('#date-to').val(end.format('MMM DD YYYY HH:mm')).trigger('input');
console.log(
'New date range selected: ' +
start.format('MMM DD YYYY HH:mm') +
' to ' +
end.format('MMM DD YYYY HH:mm') +
' (predefined range: ' +
label +
')'
);
dateFrom.dispatchEvent(new Event('input', { bubbles: true }));
dateTo.dispatchEvent(new Event('input', { bubbles: true }));
}