I want to restrict the date picker of bootstrap from taking future date.I just want to enable the dates up to today only.How can i achieve this.
Here is my code
<script>
var FromEndDate = new Date();
$(function(){
$('.datepicker').datepicker({
format: 'mm-dd-yyyy',
endDate: FromEndDate,
autoclose: true
});
});
</script>
Can any body help regarding this
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…