JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css" type="text/css" />
<input type="date" name="begin-date" value="" />
<input type="text" name="other"value="" />
<input type="hidden" id="date-value" value="" />
<div id="debugging "></div>
JavaScript
$('[type=date]').datepicker(
{
dateFormat: "yy-mm-dd",
changeMonth: true,
changeYear: true,
numberOfMonths: 1,
showButtonPanel: true,
altFormat: "mm/dd/yy",
altField: "#date-value"
})
.change(function(){
$val = $("#date-value").val();
$date = Date.parse( $(this).val() );
if (isNaN($date) == false) {$("div").html(
"value: "+$val+"<br/>"+
"timestamp: "+$date );}
else {$("div").html(
"value: not a date<br/>"+
"timestamp: "+$date);}
});