I want just date to be displayed not time in partial view
model.ReturnDate = DateTime.Now;
return PartialView("PartialView", model);
home / developersection / forums / display only date and no time
I want just date to be displayed not time in partial view
model.ReturnDate = DateTime.Now;
return PartialView("PartialView", model);
Prakash nidhi Verma
08-Jun-2018Date only not time is display in partial view:
Please use a templates with field access,property access,single-dimension array index only.
or
@Html.EditorFor(model => model.ReturnDate.ToString("MM/dd/yyyy"))partial view:
please use this method for partial view in razor as a render action.
<div> @Html.Partial("_mindstick") </div>div> @{Html.RenderPartial("_mindstick");} </div>
i hope, it will be useful for you.
Happy Coding :)
Anonymous User
30-May-2018use this syntax in your partial razor view