JSFiddle - React, Tailwind, and code Playground

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.0/jquery-ui.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.0/css/smoothness/jquery-ui-1.10.0.custom.min.css">
Date From : <input type="text" name="datefrom" id="inputdate2" required>

<p id='someText'>
  <!-- I want to set the date here after it was clicked -->
</p>

CSS

=

JavaScript

$(function() {
     
     $("#inputdate2").datepicker({
     dateFormat: 'dd-mm-yy',
    onSelect: function(dateText, inst) {
        var date = $(this).val();
        var time = $('#time').val();
        console.log('on select triggered', date);
    }
});
     
});