如何在 p:schedule 中更改按钮标签和时间格式

How to change button label and time format in p:schedule

我使用了 PrimeFaces 的 schedule。如何更改时间格式和按钮标签?

由于 Primefaces 使用了 jquery FullCalendar,就像@JasperDeVries 在 的答案中提到的那样,并且 PrimeFaces 具有扩展器功能(在对不同问题的同一答案中也提到过)我能够修复 timeFormat="LT" 的时间格式问题也使用 extender="initSchedule" 更改按钮标签。

 <h:outputScript>
            function initSchedule() {
                // Configure fullCalendar
                this.cfg.eventOrder = "-title"; // Sort descending order
                this.cfg.buttonText = { today : 'Current Date'};
                    }
    </h:outputScript>