JSFiddle - React, Tailwind, and code Playground

by Pradeep Shankar

HTML

<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="https://jqueryui.com/resources/demos/style.css">
<div>
  <p>Date:
    <input type="text" class="datepicker">
  </p>
  <p>Date:
    <input type="text" class="datepicker">
  </p>
</div>

<button id="click">
  Click me
</button>

JavaScript

$(function() {
    $(".datepicker").datepicker();

    $("#click").click(function() {
      $("div").append('<p>Date: <input type="text" class="datepicker"></p>');
      $(".datepicker").datepicker();
    });
  });