I am having @Html.TextBoxFor(m => Model.publicHoliday.Date) I want to display the Date as dd MMM yyyy and not using data Annotations…
I am also having the Jquery
<script type="text/javascript">
$(function () {
$("#publicHoliday_Date").datepicker({ dateFormat: 'dd-M-yy' , altField:'dd-M-yy', altFormat:'d/m/y' });
});
You could go with:
… or you could use this in your view:
and create a folder named
EditorTemplatesinside your[AppRoot]/Views/Sharedfolder, where you put a partial view namedDateTime.cshtmlwith the following content:Not the most flexible solution, but it should work!