JSFiddle - React, Tailwind, and code Playground

by larsolesimonsen

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css">
<div id="dialog">
    <a href="" tabindex="1"></a>
    <input type="text" id="dp"/>
</div>

JavaScript

$('#dp').datepicker();
$('.hasDatepicker').attr('tabindex', '-1');

$('#dialog').dialog(
    {
        modal:true, 
        buttons: { Ok: function() {
                $(this).dialog('close');
            }
        },
        open: function() {
            $('.hasDatepicker').attr('tabindex', '1');
        }
    }
);