This is a migrated thread and some comments may be shown as answers.

Invalid Template

0 Answers 99 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
bob
Top achievements
Rank 1
bob asked on 27 Jul 2012, 11:37 PM
Can someone tell me why this is an invalid template

<script type="text/x-kendo-template" id="recordtemplate">
    <center><h2>#= ActivityName #</h2></center>
@using (Html.BeginForm("recordcompletedactivity","engage"))
{
@(Html.Kendo().DatePicker()
.Name("DateCompleted") 
.Min(new DateTime(1900, 1, 1)) 
.Max(new DateTime(2099, 12, 31))
.Format("MMddyyyy")
.Value(DateTime.Now.ToString()));
@Html.CheckBox("Attest", new { @class = "cb" });
@Html.Encode("Check here to confirm completion this activity");
<br/><br/>
<center>
<input type="submit" class="submit" name="Button" value="Submit" />
</center>
}
</script>


i get the following error
Uncaught Error: Invalid template:' <center><h2>#= ActivityName #</h2></center> <form action="/engage/recordcompletedactivity" method="post"><input class="k-input" id="DateCompleted" name="DateCompleted" type="date" value="07272012" /><script> jQuery(function(){jQuery("#DateCompleted").kendoDatePicker({format:"MMddyyyy",min:new Date(1900,0,1,0,0,0,0),max:new Date(2099,11,31,0,0,0,0)});}); ' Generated code:'var o,e=kendo.htmlEncode;with(data){o='\n <center><h2>'+( ActivityName )+'</h2></center>\t\n<form action="/engage/recordcompletedactivity" method="post"><input class="k-input" id="DateCompleted" name="DateCompleted" type="date" value="07272012" /><script>\n\tjQuery(function(){jQuery("';DateCompleted").kendoDatePicker({format:"MMddyyyy",min:new Date(1900,0,1,0,0,0,0),max:new Date(2099,11,31,0,0,0,0)});}); ;o+=;}return o;' 

No answers yet. Maybe you can help?

Tags
Date/Time Pickers
Asked by
bob
Top achievements
Rank 1
Share this question
or