jQuery UI datepicker: How to change the month names in the drop-down from short to long names?

后端 未结 3 1789
别那么骄傲
别那么骄傲 2021-02-12 21:14

I need to change the month names from short names to long names in my jQuery UI datepicker.

My properties are:

$.datepicker.regional[\'d         


        
3条回答
  •  时光取名叫无心
    2021-02-12 21:38

    In many places they use the dateFormat to determine which list to use. Unfortunately in this block of code they weren't consistent using it. I made an adjustment to follow their method in _generateMonthYearHeader (around line 8985):

    replace

      monthNamesShort[ month ]
    

    with

     (inst.settings.dateFormat.match(/MM/) ? monthNames : monthNamesShort)[ month ]
    

提交回复
热议问题