JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<label>Start date: <input type=date id="start" required></label>
<label>End date: <input type=date id="end" required></label>
<input type=submit>
</form>
CSS
label {
display: block;
}
JavaScript
var start = document.getElementById('start');
var end = document.getElementById('end');
start.addEventListener('change', function() {
if (start.value)
end.min = start.value;
}, false);
end.addEventLiseter('change', function() {
if (end.value)
start.max = end.value;
}, false);