jquery - Javascript Datetime Time only gives "Uncaught TypeError: undefined is not a function" -


I only want to fill in one time (hh: mm). I have tried some things but i have "unco Type error: Undefined not a function "I keep. My AJAX GET call works fine.

  var id = 0; Var URL = "http: // localhost: 58510 / api / request /"; Onload = function () {showRequestDetails (); }; Function showRequestDetails () {var query = window.location.search.substring (1); Var value = query.split ("="); Id = value [1]; JQuery.support.cors = true; $ .exx ($ url: url + id, type: 'get', datatype: 'jason', success: function (data, textstatus, exhaor) {$ ("#ddarr_text") .Wal (datetimetime_recovery) ;}, Error: function (xhr, textStatus, errorThrown) {console.log ('request failed by id.');}}); }; Function date breakdown (d) {if (d! = Null) {var timonely = (d.gethors () + ":" + d.getMinutes ()); Return time only; }};  

Get the response example:

  & lt; Request & gt; & Lt; ID & gt; 2 & lt; / Id & gt; & Lt; Departure_arrivaltime & gt; 2014-10-29T12: 00: 00 & lt; / Departure_arrivaltime & gt; & Lt; / Request & gt;  

How do I get only the time in the input field?

I think your data.departure_arrivaltime is a string, Code> getHours or getMinutes -

before trying to convert to a date var d = new date (data.departure_arrivaltime);

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -