JSFiddle - React, Tailwind, and code Playground
JavaScript
var selectedDate='2012-05-14T00:00:00';
var formatttedDate=new Date(selectedDate.substr(0,selectedDate.indexOf('T')));
document.write(formatttedDate.getFullYear()+'/'+(formatttedDate.getMonth()<10?'0'+formatttedDate.getMonth():formatttedDate.getMonth())+'/'+formatttedDate.getDay());