JSFiddle - React, Tailwind, and code Playground

HTML

<div id="picker"></div>
<output id="out"></output>

CSS

#out {color:red;font-size:140%;}

JavaScript

$(function () {
    $('#picker').datepicker({
        numberOfMonths: 3,
        
        /*when you select a date the calendar
        jumps in a non sense way. if you comment 
        the line below the selected date stay 
        visible but is not what I want since 
        I want dates in the past*/
        
        showCurrentAtPos: 2,      //comment this line!
        dateFormat: "yy-mm-dd",
        onSelect: function () {
            $('#out').html(this.value);
        }
    });
});