JSFiddle - React, Tailwind, and code Playground

by UI Designer

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<link rel="stylesheet" href="http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/css/datepicker.css">
<div class="container">
    <div class="row">
        <div class='col-md-3'>
            <form action="date.php" method="post" class="form">
                <div class="form-group">
                    <div class='input-group dp1'>
                        <input type='text' class="form-control" name="startdate" id="start" >
                        <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                    </div>
                    <button class="btn btn-primary">submit</button>
                </div>
            </form>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-3">
            <p>
                Startdate is <?php echo $startdate; ?>
            </p>
        </div>
    </div>
</div>

JavaScript

$('.dp1').datetimepicker({
            format: 'DD-MM-YYYY',
            showTodayButton: true
        });

        $("#dp1").on("change.dp", function() {
            $('.form').submit();
    });