Hi,
Maybe you can take a look at the following code. But firstly you need to download the jquery-ui-1.7.2.custom.min.js from Jquery.
Firstly we need to import 2 scripts and a css file.
<link href="../../css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
Then
<script type="text/javascript" language="javascript">
$(document).ready(function() {
$('#DateReleased').datepicker({
duration: '',
showTime: true,
constrainInput: false
});
}
)
</script>
<label for="DateReleased">DateReleased:</label>
<%= Html.TextBox("DateReleased",null, ViewData["Readonly"] as IDictionary<string, object>)%>
Dictionary<string, object> ID = new Dictionary<string, object>();
ID.Add("readonly", "readonly");
ViewData["Readonly"] = ID;