跳转到主要内容

calendar_date

Description

定义迷你日历(日期选择器)中日期单元格内显示的内容

calendar_date: (date: Date) => string

Parameters

  • date - (required) Date - 表示该单元格日期的日期对象

Returns

  • text - (string) - 迷你日历日期单元格的内部HTML内容

Example

const dayDate = scheduler.date.date_to_str("%d");
scheduler.templates.calendar_date = function (date) {
// 在日历单元格的tooltip中显示当天事件的数量
const dayEnd = scheduler.date.add(date, 1, "day");
const events = scheduler.getEvents(date, dayEnd);
return "<div title='"+events.length+" events'>" +dayDate(date)+ "</div>";
};

Details

注释

该模板仅在启用minical插件时生效。

mini_calendar_templates

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.