我使用以下代码来显示日历
$( "#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();
}
});
我想在年后添加年份符号,如下所示
答案 0 :(得分:0)
我使用以下代码获得了此信息。
class ParkSerializer(serializers.ModelSerializer):
location = serializers.CharField(source='alternate_name')
class Meta:
model = Park
fields = ('id', 'name', 'location')