title: Pass C# variable to helper function in jsrender template
body: <p>I need to pass one of my model value to the function in jsrender template. I tried using @ for accessing the C# variable, but its not working. Below is my code</p>
  
  <pre><code>&lt;script type="text/x-jsrender" id="TemplateDate"&gt;&gt;
   {{:~formatTemplateDate(Model.EstimatedCompletionDate)}} 
  &lt;/script&gt;
  </code></pre>
  
  <p>This is my helper function.</p>
  
  <pre><code>$.views.helpers({
      formatTemplateDate: function (dateEstimated) {
          "use strict";
          if (dateEstimated !== null) {
              if (!isSafari) {
                  var options = {
                      year: "numeric",
                      month: "short",
                      day: "numeric",
                      hour: "2-digit",
                      minute: "2-digit"
                  };
                  return dateEstimated.toLocaleTimeString("en-us", options);
              } else {
                  return dateEstimated;
              }
          } else {
              return null;
          }
      }
  });
  </code></pre>
  
  <p>This is the error i get in the page </p>
  
  <p><code>Error: n.toLocaleDateString is not a function.</code></p>
  
  <p>Thanks in advance.</p>
  
  <p>Dinesh.</p>