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

问题描述 投票:2回答:1

我使用了PrimeFaces的schedule,但有人可以帮助我如何更改时间格式和按钮标签。

primefaces fullcalendar
1个回答
2
投票

[Primefaces使用了@JasperDeVries在How to get the event when prev,next are clicked in p:schedule的答案中提到的jquery FullCalendar jQuery,并且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> 
© www.soinside.com 2019 - 2024. All rights reserved.