PrimeNG日程安排自定义按钮 [英] PrimeNG schedule custom buttons
本文介绍了PrimeNG日程安排自定义按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以在PrimeNG Schedule组件中使用完整的日历自定义按钮吗?
Can use full calendar custom buttons in PrimeNG Schedule component?
我尝试通过@ViewChild("calendar-id")使用ElementRef,但是我得到了p棚对象类型,而没有任何fullCalendar方法.
I've tried to use ElementRef by @ViewChild("calendar-id"), but I get p-shedule object type, without any fullCalendar methods.
customButtons: {
myCustomButton: {
text: 'custom!',
click: function() {
alert('clicked the custom button!');
}
}
},
推荐答案
今天最好的方法是制作自己的按钮. 可以使用日历@ViewChild("calendar-id")的ElementRef完成.
The best way to do it today is make your own buttons. It can be done with ElementRef of your calendar @ViewChild("calendar-id").
@ViewChild('calendar-id') calendar;
ngAfterViewInit(): void {
this.calendar.*;
}
*是PrimeNG时间表文档中的函数-方法
Where * is function from PrimeNG schedule docs - Methods
这篇关于PrimeNG日程安排自定义按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文