I have used Jquery UI datepicker. My model looks like:
[DataType(DataType.Date)]
public DateTime? endDate { get; set; }
For displaying in view
@Html.TextBoxFor(x => x.endDate, new { @class = "datepicker" })
Script
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$(function () {
$(".datepicker").datepicker({
dateFormat: "mm/dd/yy",
changeMonth: true,
changeYear: true
});
});
});
</script>
When the date time is displayed it looks like 09-Nov-12 12:00:00 AM I just want to show date without time.Thankx for the help.