uxsolutions / bootstrap-datepicker

A datepicker for twitter bootstrap (@twbs)
Apache License 2.0
12.66k stars 6.08k forks source link

year not shown in months view when maxViewmode === 1 #2389

Open RGunning opened 6 years ago

RGunning commented 6 years ago

Expected behaviour

When viewing full year i.e. month selection view, you should be able to see what year you are looking at.

Actual behaviour

If maxViewmode is set to 1, then title is set to 'Months' or the local translations and has no reference to the which year you are looking at.

Datepicker version used

1.8.0 (latest)

Example code

problematic lines https://github.com/uxsolutions/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js#L1066 https://github.com/uxsolutions/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js#L1069

Solution would be to add year to monthsTitle or an option to display the year instead of 'Months'

diesl commented 4 years ago

Today, I also noticed this bug.

The selected year should be displayed to have a consistent behaviour.

Still occurs with version 1.9.0