Hi there:
I need to get the first and last dates shown on the calendar.
When I shown the calendar with a custom template , I could get the dates with:
var date_from =calendar.view.activeStart;
var date_to= calendar.view.activeEnd;
But now I don't know how to do it. I've tried adding a console.log after this code in Server->Global->All Pages->Page_Head
echo <<<EOD
<script>
loadjs.ready("jquery", () => {
$(document).on("calendar", function (e, args) {
const BtnPlaniDiaria = {
BtnPlaniDiaria: {
text: 'Enviar',
click: function() {
alert('testing');
}
}
};
args.options.customButtons = Object.assign(args.options.customButtons, BtnPlaniDiaria);
console.log(args.options); // View all options
});
});
</script>
EOD;
but I can't find activeStart or activeEnd
Any ideas?
Thanks¡