JSFiddle - React, Tailwind, and code Playground

HTML

<input class="datepicker" />
<div id="button-tinymce-datepicker">Button</div>

CSS

body {
    margin-top: 40px;
}
#button-tinymce-datepicker {
    float: right;
}

JavaScript

$('.datepicker').datepicker({
    beforeShow: function (input, inst) {
        setTimeout(function () {
            var button = $('#button-tinymce-datepicker');
            var offset = button.offset();
            inst.dpDiv.css({
                top: offset.top,
                left: offset.left
            });
        }, 0);
    }
});