JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js"></script>
<link rel="stylesheet" href="http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.css">
<div id="test">
    <button id="add">add</button><br>
<input id="datepickerfrom_1_1"/>
</div>

JavaScript

$(document).ready(function() {
    var id = 1;
    $('#test').on('focus', 'input[id^="datepickerfrom"]', function() {
        $(this).datetimepicker({
            dateFormat: 'yy-mm-dd',
            timeFormat: 'HH:mm:ss'
        });
    });
    $("#add").on('click',function(){
        id++;
       $("#test").append('<div><input id="datepickerfrom_1_'+id+'"/><button name="remove">X</button></div>');
    });
    $("#test").on('click','[name="remove"]',function(){
        $(this).parent().remove();
    });
});