Hello,
I want to use the Date.now() functionality in the template to compare a date with the current date, but it looks like the date object is always null, and when I use Date.now() the template renders as #TemplateName (as in an error raised probably?)
<##script type="text/x-jsrender" id="Status">
${if(DateFinished == null)}
<##span>DateFinished is null!
${else if(Date == null)} <!--CONDITION IS ALWAYS TRUE!-->
<##span>Date is null!
${else if(DateFinished != null && Date.now() > DateFinished)} <!--THIS LINE BREAKS THE TEMPLATE, AND THE RESULT IS ALWAYS #Status-->
<##span>Date is null!
${else}
<##span>in last else statement
${/if}
<##/script>
P.s. How can I add code fragments into a forum post (with markup, and without have to use the <## I do above