I am trying to put in a datepicker on a @Html.TextBox. The date field is to be used as a search criteria field so that I can compare a date entry to a date in the table. This is what I have for my scripts:
<link href="~/Content/ui_1.10.4_themes_smoothness_jquery-ui.css" rel="stylesheet" />
<script src=" ~/Scripts/jquery-1.10.2.js"></script>
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script>
$(document).ready(function () {
$("#getdate").each(function () {
$(this).datepicker();
});
});
This is what I have for my TextBox:
Date Received: @Html.TextBox("SearchString5", new {@class="getdate"}, ViewBag.CurrentFilter as string)
What it results in is that the words new {@class="getdate"} showing up in the TextBox.