praveenkumar praveenkumar - 2 months ago 7
jQuery Question

Is it possible to customize the years range in bootstrap date picker

I have a attribute name is assessment year,in that attribute if i choose the year(ex 2012),the bootstrap date picker display the 2012 calendar only

my js file



$('.datepicker').datepicker({
format: "dd/mm/yyyy",
todayHighlight: true,
todayBtn: 'linked',
autoclose: true
});





I searched the lot of things,still i am not get a correct answer...help me friends

Answer

simple just add startDate and endDate assuming that you selected year "2016" http://jsfiddle.net/LcqM7/542/

$('.datepicker').datepicker({
    autoclose: true,
    startDate: '01/01/2016',
    endDate: '12/31/2016'
});