JSFiddle - React, Tailwind, and code Playground

by mjaric

HTML

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css">
<table>
<tr>
    <td>Name1</td>
    <td class="dateCell">12/12/2012</td>
</tr>
</table>

CSS

table {
    
}
td {
    border:1px solid #ccc;
    padding:3px;   
}

JavaScript

$("td.dateCell").on("click",function() {
    var dateInput= $('<input type="text" name="editStartDate" value="" class="editStartDate" />');
    var value=$(this).text();
    $(this).empty().append(dateInput);
    $(".editStartDate").val(value).datepicker({}).datepicker("show");
});