vue.js - 带有 API/props 的完整日历集 dayNames
问题描述
我正在使用 Fullcalender 的 Vue 组件,但找不到更改默认日期名称的选项。
https://fullcalendar.io/docs/v3/dayNames
我试图通过这样的道具:
<FullCalendar
:option="{
dayNames:[
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
]}"
/>
或者
<FullCalendar
:dayNames="['Sunday',
'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday']"
/>
但它没有用。我不知道如何将它们传递给组件。
解决方案
我使用 jQuery 制作了一个快速函数来执行此操作:
var headerElems = $('.fc-day-header');
if (headerElems.length > 0) {
headerElems.each((k, v) => {
var text = $('span', v).text();
// set first chart as text
$('span', v).text(text[0]);
});
}
推荐阅读
- python - Django 2.0 迁移错误:“django.core.exceptions.AppRegistryNotReady:尚未加载应用程序。”
- regex - Spacy 自定义标记器使用中缀正则表达式仅包含连字符作为标记
- powershell - C# 和 Powershell 运行空间造成大量非托管内存泄漏
- r - R Keras 连接两个神经网络
- javascript - 如何动态删除javascript中的元素?
- multithreading - 我们可以通过 linux/VxWorks 中睡眠下的任务来测量资源使用情况吗?
- javascript - 在 javascript ajax 中的选择选项上设置 cookie
- mysql - 无法从 AWS Lambda 连接到默认 VPC 中的 AWS RDS 实例
- python - Django 编辑表单
- vbscript - 在 Windows 10 上运行的系统上设置本地计算机名称和静态 IP 地址