MVC Change datetype in view

Asked by At

i want to change that datetype to month/year. how can i do it ?

Date format image

public Nullable<System.DateTime> Month { get; set; }

<div class="form-group">
     @Html.LabelFor(m => m.Month, new { @class = "control-label col-sm-3" })
     <div class="col-sm-9 input-group date">
         @Html.EditorFor(model => model.Month, new { htmlAttributes = new { @class = "form-control input-circle " } })
         @Html.ValidationMessageFor(model => model.Month, "", new { @class = "text-danger " })
     </div>
 </div>

0 Answers