首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我们怎样才能在点击fullcalendar-angular CustomButton时添加类似html的下拉列表?

问我们怎样才能在点击fullcalendar-angular CustomButton时添加类似html的下拉列表?
EN

Stack Overflow用户
提问于 2021-03-24 21:11:05
回答 1查看 307关注 0票数 0

我正在做一个完整的日历-角度组件,在其中我有一个自定义按钮叫做过滤器,点击它,模式/对话框/菜单项应该会像下拉菜单一样打开。那么我们如何在customButton点击函数下实现这一点呢?有没有一种添加HTML的方法和方法?如图所示。

代码语言:javascript
复制
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'
        },

fullcalendar-angualr custombutton image

EN

回答 1

Stack Overflow用户

发布于 2021-04-01 10:34:06

我是Angular的新手,但是我能够通过在eventDidMount钩子之后调用的函数为下拉菜单注入一些超文本标记语言来创建一个下拉列表。

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

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66781776

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档