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.

modelstate.clear()

asp.net mvc modelstate.clear.

if retreive value via ajax call, set cache:false


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -