JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="9/23/2012 3:39:49 AM" id="dateText" />

JavaScript

$(function(){
   $("#dateText").val($.datepicker.formatDate('dd-M-yy', new Date($("#dateText").val())));

});