• Resolved mjunes

    (@mjunes)


    Hello,

    I have a new issue now. The print window doesn’t show the complete Date field. Instead it shows only the time (hour). Please find the url in the pastebin. Click the printform button to see the issue.

    https://pastebin.com/Lgj6708Z

    Also, is it possible to make the chart centered in the print window, like how it appears in the form?

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @mjunes,

    My apologies for the delay in respond to your ticket, I was doing some test and modifications, please replace the piece of code of the printForm routine with the following one:

    
    <script>window['printForm']=function(selector){function _cloneCanvas(newCanvas,oldCanvas){var context=newCanvas.getContext('2d');newCanvas.width=oldCanvas.width;newCanvas.height=oldCanvas.height;context.drawImage(oldCanvas,0,0);};function _getStyles(){var r='';$(document).find('link[type*="css"],style').each(function(){r+=this.outerHTML;});return r;};function _callPrint(w){if(w&&w["printMe"]) w["printMe"]();else setTimeout(function(){_callPrint(w);},50);};try{if(typeof jQuery!='undefined'){if(typeof selector!='undefined'){var $=jQuery,f=$(selector),c,e,h,t,w,d;if(f.length){c=f.clone();c.find('script').remove();c.find('input').each(function(){e=$(this);if(typeof e.prop('checked')!='undefined') e.attr('CHECKED',e.prop('checked'));e.attr('value',e.val());});c.find('SELECT').each(function(){e=$(this);t=f.find('[id="'+e.attr('id')+'"] option:selected').text();e.replaceWith(t);});c.find('TEXTAREA').each(function(){e=$(this);t=e.val();e.replaceWith(t);});h=c[0].outerHTML;w=$('#cff_iframe_for_printing');if(w.length==0){w=$('<iframe id="cff_iframe_for_printing" name="cff_iframe_for_printing" style="display:none;"></iframe>');w.appendTo('body');} d=w[0].contentWindow.document;d.write('<body>'+_getStyles()+h+'</body>');setTimeout(function(){d.close();$(d).find('canvas').each(function(i,e){_cloneCanvas(e,f.find('canvas:eq('+i+')')[0]);});var ua=window.navigator.userAgent,msie=ua.indexOf("MSIE ");if(msie!==0){w[0].contentWindow.document.execCommand('print',false,null);}else{w[0].contentWindow.print();}},1500);}else{throw"Form's selector is incorrect";}}else{throw'Requires the selector';}}else{throw'Requires the jQuery framework';}}catch(err){if(typeof console!='undefined') console.log(err);}};</script>
    

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Date Field Not Printing’ is closed to new replies.