jquery - Datepicker not set to value passed in the controller -
i have created datepicker using :
@html.textboxfor(model => model.dateto, new { @class = "form-control dateto" })
and
$(".dateto").datepicker({ dateformat: 'dd/mm/yy', numberofmonths: 1, autoclose: true, });
and in view model : [display(name = "to")] public string dateto { get; set; }
and have updated field dateto , passing view in controller as:
return view(searchviewmodel);
in searchviewmodel, dateto set 26/11/2014. when page, caching old values , not resetting value.
any input on helpful.
Comments
Post a Comment