Reputation: 303
I want to be a create date picker calender . Which having option to select multiple dates with single input field . Please help me if someone have do before.
<script>
var drp;
function makedatepicker(){
drp = $("#myDate").datepicker({});
}
function getRange(){
$("#myOutput").html("");
$(drp.getDateRange()).each(function() {
$("#myOutput").append($("<li>").html($.datepicker.formatDate("dd/MM/yy",this)));
});
}
$( document ).ready(function() {
makedatepicker();
});
</script>
Thanks
Upvotes: 3
Views: 7487
Reputation: 4818
To select multiple date from one input you can use the datepick.js Which allow you to select multiple date at a time.
Here is the link for the demo and download
To see the demo for multiple date select click on "Multiple" tab on this page
You can select multiple dates using :
<input type="text" id="multi999Picker" size="60" class="is-datepick" />
$(document).ready(function(){
$('#multi999Picker').datepick({
multiSelect: 999,
monthsToShow: 2,
showTrigger: '#calImg'
});
});
Upvotes: 1