我们如何在点击fullcalendar angular CustomButton时添加类似html的下拉列表



我正在开发fullcalendar angular组件,其中我有一个名为filter的自定义按钮,单击它时,模式/对话框/菜单项应该像下拉菜单一样打开。那么我们如何在customButton点击功能下实现这一点呢?有添加HTML的方法吗?如何添加?如图所示。

calendarOptions:CalendarOptions = {
initialView:'dayGridMonth',
themeSystem:'bootstrap',
nowIndicator:true,
//showNonCurrentDates:false,
fixedWeekCount:false,
customButtons:{
myCustomBtton: {
bootstrapFontAwesome:'fas fa-sliders-h',
click: function(click,element){
//how do i add the code here`enter code here`
},
},
},
headerToolbar:{
left:'prev,next today',
center:'title',
right:'dayGridMonth,dayGridWeek,dayGridDay,listMonth myCustomBtton'
},

全日历语言自定义按钮图像

我是Angular的新手,但我可以通过在eventDidMount钩子后调用的函数为下拉列表注入一些HTML来创建下拉列表。

https://fullcalendar.io/docs/event-render-hooks

如果对你有用的话,我很乐意给你一些示例CSS/JS来显示隐藏下拉列表。

最新更新