I'm using Joomla as my CMS and I use below JavaScript to print specific area of the page (actually the whole body here).
JavaScript
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}
I use Joomla to get a calendar on the same page in the body selection.
PHP
<?php echo JHTML::calendar($filter_date_to,'filter_date_to', 'filter_date_to', '%Y-%m-%d', `'');?>
After trying to print something the calendar stop working. No js error are shown in the console too. What seems to be the problem?