mvc 5 bootstrap datetimepicker incorrect display
when setup datetime display format in javascript it displays datetime value incorrectly, the following are what I have done to ensure my datetime value is displayed correctly
in my javascript I have
$('.dtpicker').datetimepicker({
format: 'YYYY/MM/DD HH:mm'
});
in my model I have a property
[Display(Name = "Paid Time")]
[DisplayFormat(DataFormatString = "{0:yyyy/MM/dd HH:mm}")]
public DateTime PaidDateTimeLocal { get; set; }
in my view I make sure the datetime format is reinforced
@Html.TextBoxFor(model => model.PaidDateTimeLocal, new { Value = Model.PaidDateTimeLocal.ToString("yyyy/MM/dd HH:mm"), @class = "dtpicker" })