跳转到主要内容

checkInMarkedTimespan

Description

判断一个事件是否落在指定类型的时间段内

checkInMarkedTimespan: (event: any, timespan: string) => boolean

Parameters

  • event - (required) object - 事件对象
  • timespan - (required) string - 时间段的类型

Returns

  • isIn - (boolean) - true 如果事件发生在指定的时间段类型内

Example

scheduler.addMarkedTimespan({
start_date: new Date(2013,4,1),
end_date: new Date(2013,7,1),
css: "red_section",
type:"discount"
});

var eventId = scheduler.addEvent({
start_date: "16-05-2013 09:00",
end_date: "16-05-2013 12:00",
text: "Meeting",
holder: "John",
room: "5"
})
...
scheduler.checkInMarkedTimespan(scheduler.getEvent(eventId), "discount"); //->true

Applicable views: Timeline view

Details

注释

此方法需要启用 limit 插件。

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.