JSFiddle - React, Tailwind, and code Playground
by wiltomap
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<label for="date1">Date 1 :</label>
<input type="text" id="date1"/><br/><br/>
<label for="date2">Date 2 :</label>
<input type="text" id="date2"/><br/><br/>
<button id="test">Test</button>
JavaScript
$(function() {
$("#date1").datepicker();
$("#date2").datepicker();
$('#test').click(function() {
if ($('#date1').val() <= $('#date2').val()) {
alert('OK !');
} else {
alert('Pas bon...');
}
});
});