JSFiddle - React, Tailwind, and code Playground

by Prakash D

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
 
        <label for="from">From</label>
        <input type="text" id="fromdate" name="from">
         <label for="to">to</label>
        <input type="text" id="todate" name="to">

JavaScript

$(function() {
                $("#fromdate").datepicker({
                    onSelect: function() {
                        $(this).change();
                    }
                });
                $("#fromdate").change(function (){
                    var val=$("#fromdate").val();
                    $("#todate").val(val);
                });
            });