JSFiddle - React, Tailwind, and code Playground
by Chace
HTML
<script src="http://momentjs.com/downloads/moment.min.js"></script>
<input type="text" id="h_reg_date"class="abs" style="top:135px; left:150px;" size="10" readonly >
<input type="button" id="save_data" class="abs" style="top:370px; left:-200px;" value="Add Data">
JavaScript
$( "#h_reg_date" ).datepicker();
$("#h_reg_date").datepicker("option", "dateFormat", "yy/M-dd");
$("#save_data").on("click", function(){
var reg_date = $("#h_reg_date").val();
console.log(reg_date);
reg_date = moment(reg_date).format("YYYY/MM/DD");
console.log(reg_date);
return;
});