JSFiddle - React, Tailwind, and code Playground

HTML

<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>jQuery UI Datepicker - Select a Date Range</title>
  
</head>
<body>
 
<label for="from">From</label>
<input type="text" id="from" name="from" />
<label for="to">to</label>
<input type="text" id="to" name="to" />
 
 
</body>
</html>

CSS

body { 
font-family: verdana; 
font-size: 12px; 
}

JavaScript

$(function() {
    $( "#from" ).datepicker({
      changeMonth: true,  
      changeYear:true,      
      maxDate:0,
      onSelect: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({      
      changeMonth: true,   
      changeYear:true,
      maxDate:0,
      onSelect: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });