Datepicker: modified the generate Html to draw the right months.

Datepicker: modified the generate Html to draw the right months. Fixed
#8910 - Datepicker: Incorrect month displayed based on minDate and
maxDate