This question is locked. New answers and comments are not allowed.
Hi I have a problem with my date picker.
In my form I have a date picker input, that I declared like that
In my model the date is declared like that
and in my controller i just do this
the problem comes when I reload the partial view. on my page I select a date that is in the date picker like this 22/08/2012, then after the view is reloaded i get the date in my datepicker like this 2012-08-22T08:01:36Z
I cannot undestand what i'm doing wrong. can somebody help me?
Thank you
In my form I have a date picker input, that I declared like that
@(Html.Telerik().DatePickerFor(model => model.InvoiceDate)
.ShowButton(true)
)
In my model the date is declared like that
public
DateTime? InvoiceDate { get; set; }
and in my controller i just do this
[HttpPost]
public
ActionResult Create(InvoiceModel invoice)
{
if
(ModelState.IsValid)
{
_invoiceRepository.Insert(invoice);
}
return
PartialView(
"_create"
, invoice);
}
the problem comes when I reload the partial view. on my page I select a date that is in the date picker like this 22/08/2012, then after the view is reloaded i get the date in my datepicker like this 2012-08-22T08:01:36Z
I cannot undestand what i'm doing wrong. can somebody help me?
Thank you