Search code examples
javascriptjquerytwitter-bootstrapdatepicker

Bootstrap jalali datepicker selecting years limitation


I'm using bootstrap jalali datepicker from this github.

First Image:


enter image description here


In the above image you can see if I want to selected years less than 1384, There is no number less than 1384!! After the selected 1384 and open the drop down again. In the second picture you can see the values appear lower than in 1384. I want to all the years are displayed numerically. I'm forced to choose values of less than 1384 every time I repeat the above operation And this is a tedious task!

I got a message to the developer of this calendar but did not receive a response.

Does anyone can change the code in this calendar?


Second Image enter image description here



Solution

  • you need to add yearRange in your script. Try following code

    $("#datepicker4").datepicker({
                        changeMonth: true,
                        changeYear: true,
                        yearRange: '1100:2100'
                    });