Is there any solution to this available yet? There must be a solution where we could just use default currency and date/time format among other things...
Or do we still suffer because of Telerik bug?
[UIHint("DateNullable")]
[DisplayFormat(DataFormatString = "{0:dd-MM-yyyy}", ApplyFormatInEditMode = true)]
[NopResourceDisplayName("Admin.Customers.Customers.Fields.DateOfBirth")]
public DateTime? DateOfBirth { get; set; }
@model DateTime?
@using System.Globalization
<input id="@ViewData.TemplateInfo.GetFullHtmlFieldId(string.Empty)" name="@ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)" value="@(Model > DateTime.MinValue || Model.HasValue ? Model.Value.ToString(CultureInfo.CurrentCulture.DateTimeFormat) : null)" />
<script>
$(document).ready(function () {
$("#@ViewData.TemplateInfo.GetFullHtmlFieldId(string.Empty)").kendoDateTimePicker({
popup: {
position: "bottom right",
origin: "top right"
},
format: "dd/MM/yyyy HH:mm"
});
});
</script>
@model DateTime?
@using System.Globalization
<input id="@ViewData.TemplateInfo.GetFullHtmlFieldId(string.Empty)" name="@ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)" value="@(Model > DateTime.MinValue || Model.HasValue ? Model.Value.ToString(CultureInfo.CurrentCulture.DateTimeFormat) : null)" />
<script>
$(document).ready(function () {
$("#@ViewData.TemplateInfo.GetFullHtmlFieldId(string.Empty)").kendoDateTimePicker({
popup: {
position: "bottom right",
origin: "top right"
},
format: "dd/MM/yyyy HH:mm"
});
});
</script>