JSFiddle - React, Tailwind, and code Playground
HTML
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css" />
</head>
<body>
<select id="selectMonth"><option value="01">Jan</option><option value="02">Feb</option>
<option value="03">Mar</option><option value="04">Apr</option>...</select>
<select id="selectDay"><option value="01">1</option><option value="02">2</option>
<option value="03">3</option><option value="04">4</option>...</select>
<select id="selectYear"><option value="2012">2012</option><option value="2013">2013</option>
<option value="2014">2014</option>...</select>
<p>Date: <input type="text" id="selectedDatepicker" /></p>
</body>
JavaScript
$(function() {
$('#selectedDatepicker').datepicker({
beforeShow: readSelected, onSelect: updateSelected,
minDate: new Date(2012, 1 - 1, 1), maxDate: new Date(2014, 12 - 1, 31),
showOn: 'both', buttonImageOnly: true, buttonImage: 'img/calendar.gif'});
// Prepare to show a date picker linked to three select controls
function readSelected() {
$('#selectedDatepicker').val($('#selectMonth').val() + '/' +
$('#selectDay').val() + '/' + $('#selectYear').val());
return {};
}
// Update three select controls to match a date picker selection
function updateSelected(date) {
$('#selectMonth').val(date.substring(0, 2));
$('#selectDay').val(date.substring(3, 5));
$('#selectYear').val(date.substring(6, 10));
}
});