title: How to convert JavaScript Date object to string that is compatible with datetime-local input?
body: <p>Basically I have a Date object. How can convert it to a string compatile with <code>datetime-local</code> format <em>yyyy-MM-ddThh:mm</em>?</p>
  
  <p>I tried <code>Date.toISOString</code> method, but it doesn't work as it appends <code>.SSSZ</code> at the end. Gives me the following output <code>The specified value "2017-04-10T17:02:00.320Z" does not conform to the required format. The format is "yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS".</code>.</p>
  
  <p>Does anyone have any <strong>clean</strong> solution to this problem?</p>