This question is locked. New answers and comments are not allowed.
ASP.NET MVC 3
OS: Windows
Browser: Google Chrome 17.0.963.56 m
Telerik: Extensions for ASP.NET MVC Q1 2012
Preferred Language: C# , Razor
Hello,
i am using a nullable Date in my Model:
with the following template
The problem occures when I try to update the date from non-null value (e.g. 8/21/1972) to the empty one. In this case after update the previous non-null value is set instead of the empty one.
Here is the update method in controller:
Please, find the sample project attached. Steps to reproduce: try to update any birth date to null (clear it up) and save it.
Please, advise.
Thank you,
Victoria
OS: Windows
Browser: Google Chrome 17.0.963.56 m
Telerik: Extensions for ASP.NET MVC Q1 2012
Preferred Language: C# , Razor
Hello,
i am using a nullable Date in my Model:
[DataType(DataType.Date)]public DateTime? BirthDate { get; set; }@model DateTime?@(Html.Telerik().DatePickerFor(m => m) .HtmlAttributes(new { id = ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty) + "_wrapper" }))The problem occures when I try to update the date from non-null value (e.g. 8/21/1972) to the empty one. In this case after update the previous non-null value is set instead of the empty one.
Here is the update method in controller:
[AcceptVerbs(HttpVerbs.Post)][GridAction]public ActionResult _Update(int id){ var customer = SessionRepository.One(p => p.Id == id); TryUpdateModel(customer); SessionRepository.Update(customer); return View(new GridModel(SessionRepository.All()));}Please, find the sample project attached. Steps to reproduce: try to update any birth date to null (clear it up) and save it.
Please, advise.
Thank you,
Victoria