javascript - How to set a datetime variable as mindate and maxdate in datepicker -


This date is retrieved 06/03/2014 12:00:00 AM and end date 31/03/2015 Is 12: 00:00 am but my jquery warning message is showing this way in / 9413044200000 / I do not know what a problem is, I need to decide the date and maximum date datepicker pls help me any one .

My JsonResult

  Public JsonResult GroupName (string tournam, string match type) {var sdate = entity.TblTournaments.FirstOrDefault (x => x.Turname == Tourname & amp; amp; amp; x.Recordstatus == 1). TorrentDatabase; Var edate = entity.TblTournaments.FirstOrDefault (x => x.Turname == Tournam & amp; X. Recordsstate == 1). Tour Ended; Var data = new {sdate, edate}; Returns Jason (Data, Jason Aref Behavior AloGuget); }  

and my jquery

  $ .post ("/ BindInventory / GroupName", {tourname: tname, MatchType: MatchType}, function (result ) {Var startdate = result.sdate; var enddate = result.edate; alert (result.sdate); $ ('# date') Datepicker ('option', 'minValue', new date (start)); $ ( '#date') datepicker ('option', 'maximum value', new date (expiration);}, "jason");  

You need to parse JSON - date:

  var date = new date (parseInt (jsonDate.substr (6)));  

Source here:

Edit : In your case:

 < Code> $ Post ("/ BindInventory / GroupName", {tourname: tname, MatchType: MatchType}, function (results) {var startdate = new date (parseInt (result.sdate.substr (6))); var enddate = new date (persian) $ ('# Date'); $ ('Option', 'Minvalue', StartDate); $ ('# Date'). Recorder ('Option', 'Maxville ', Ended);}, "JSN");  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -