JSFiddle - React, Tailwind, and code Playground

by chintsu

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css">
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<input id="ShowDialog" type="button" value="Show Dialog" />

<div id="dialog">
    <input type="text" class="datepicker" />
</div>

CSS

#dialog {
    display: none;
}

JavaScript

$('#ShowDialog').click(function(){
   var $dialog = $('#dialog');
   
    
    $('.datepicker').datepicker();
   //$dialog.dialog('destroy');
   $dialog.dialog({
       modal: true,
       open: function() {
         // $('.datepicker').datepicker();
       },
       buttons: [ 
           { 
               text: 'Ok', 
               click: function() {
                   $dialog.dialog('close');
               }
           } ]               
   });
    
   
});