JSFiddle - React, Tailwind, and code Playground
by Alex Azuero
HTML
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/themes/black-tie/jquery-ui.css">
<table>
<tbody>
<tr>
<td>
<input id="example1" type="text" value="Click me." />
</td>
</tr>
</tbody>
</table>
<div id="example1-result" class="example">The selected date as text is: ''</div>
CSS
div.feedback {
color: red;
font-size: 0.5em;
margin-top:-20px;
}
div.example {
border: 2px solid #FF0000;
margin-top: 20px;
padding: 20px;
}
input {
box-sizing: border-box;
width: 276px;
padding: 5px 7px;
margin: 0;
outline: 0;
font-size: 1.1em;
background: #fff;
border: #e3e1d5 1px solid;
border-radius: 2px;
transition: all 0.15s ease-in-out;
}
table {
margin: 1.6em 0;
box-sizing: border-box;
width: 100%;
max-width: 100%;
background-color: transparent;
}
tbody {
display: table-row-group;
vertical-align: middle;
border-color: inherit;
}
table th, table td {
padding: 8px;
line-height: 20px;
text-align: left;
vertical-align: middle;
border-top: 1px solid #edece4
}
JavaScript
$("#example1").datepicker({
dateFormat: "yy-mm-dd",
onSelect: function () {
var div = $("#example1-result");
div.html('The selected date as text is: ' + $("#example1").val());
}
});