1

我正在使用以下代码来显示日历

$( "#datepicker" ).datepicker({
        numberOfMonths: 2,
         selectMultiple: true,
         monthNames: [ "1月","2月","3月","4月","5月","6月",
                         "7月","8月","9月","10月","11月","12月" ],
        dayNamesMin: ['日','月','火','水','木','金','土'],
        showMonthAfterYear: true, //this is what you are looking for

        beforeShowDay: highlightDays,
        onSelect: function(selectedDate) {
            date = jQuery(this).datepicker("getDate");
            var rs = date.getDate();                               
        }
        });

电流输出在此处输入图像描述

我想在一年之后添加年份符号,如下所示

在此处输入图像描述

4

1 回答 1

0

我用以下代码得到了这个。

 $("#datepicker").datepicker({
        numberOfMonths: 2,
        showMonthAfterYear: true,
        yearSuffix: "Year", //this is what you are looking for
    }

    });
于 2017-04-19T10:05:31.840 回答