Approved is a DateTime in my model. approvedDate is a Datetime variable in my Razor view.
I want to test Approved to see if it is before approvedDate and replace it with a empty string "" if it is inside the x-kendo-template detail-template.
@{ var approvedDate = DateTime.Parse("01-01-2016"); }
<script id="detail-template" type="text/x-kendo-template">
<ul>
< li>#if (# #= Approved # # < @approvedDate) {# ""#}else{# #= kendo.toString(Approved, "MM-dd-yyyy") # #}#</li>
</ul>
</script>
The above syntax causes the detail-template script to fail.
What is the syntax to make this if statement work?