I wanted to come out with a date range picker where shows in picture below. ideal output
Here is my updated code that I doing now and the output I have it now.
$(function() {
$("#fromperiod").datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
onClose: function(selectedDate) {
$("#toperiod").datepicker("option", "minDate", selectedDate);
}
});
$("#toperiod").datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
onClose: function(selectedDate) {
$("#fromperiod").datepicker("option", "maxDate", selectedDate);
}
});
});
.picker {
display: inline;
border: 1px solid lightgray;
padding : 4px;
}
input {
border: 0;
}
<link href="https://code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<table>
<tbody>
<tr>
<td>Period</td>
</tr>
<tr>
<td>
<div class='picker'>
<label for="fromperiod">From</label>
<input type="text" id="fromperiod" name="from">
<label for="toperiod">to</label>
<input type="text" id="toperiod" name="to">
</div>
</td>
</tr>
</tbody>
</table>
Here is my output based on the code. output