I'm new to this datepicker, and I don't know how to get the month and year string in changeMonth and changeYear change events. Here is the link to the plugin: https://github.com/eternicode/bootstrap-datepicker
The problem is that onchange only captures the transition from a few months to years. I can only get the day / date of the selected date, and nothing is selected during the transition.
I tried to grab text from a div, but I'm always one of them too late. How can I get the month and year of the value selected after the transition.
To clarify: getYear () when we see all 12 months after moving from a ten-year review
getMonth () when we see the days after viewing the month
Here is my fiddle: http://jsfiddle.net/vj3cdzbc/2/
source share