JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
<link rel="stylesheet" href="http://jquerytools.org/media/css/standalone.css">
<link rel="stylesheet" href="http://jquerytools.org/media/css/dateinput/skin1.css">
<input type="date" name="date1" value="Today" />
<input type="date" name="date2" value="10 days from now" min="2010-03-01" max="2012-01-01" class="one" />
<input type="date" name="date3" value="15" min="-25" max="25" data-value="15" />
CSS
/* a little more width for input fields */
.date {
width:220px;
}
JavaScript
$(":date").dateinput({
format: 'dddd dd, mmmm yyyy', // the format displayed for the user
selectors: true, // whether month/year dropdowns are shown
min: -100, // min selectable day (100 days backwards)
max: 100, // max selectable day (100 days onwards)
offset: [10, 20], // tweak the position of the calendar
speed: 'fast', // calendar reveal speed
firstDay: 1, // which day starts a week. 0 = sunday, 1 = monday etc..
change: function (a) {
console.log($(this)[0].getConf().min);
console.log($(this)[0].getConf().max);
}
});