如何在zk中将数组值传递给javascript

如何在zk中将数组值传递给javascript

本文介绍了如何在zk中将数组值传递给javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我的要求,我必须将日期数组传递给 javascript 以更改日历日的颜色.

As per my requirement i have to pass date array to javascript for color change calendar day .

但我已经完成了 http://zkfiddle.org/sample/15d409/23-Disable-Datebox 方式,但点击日历后更改值

but i have done http://zkfiddle.org/sample/15d409/23-Disable-Datebox way but it's change value after click on calendar

推荐答案

因为在这种情况下,Clients.evalJavaScript 会在所有其他小部件的 js 函数都完成后 eval jsCommand,因为渲染小部件的命令 (renderProperties) 将在此之前被调用doAfterCompose.

Because Clients.evalJavaScript will eval jsCommand AFTER all other js function of widgets are done in that case, since the command for render widget (renderProperties) will be called before doAfterCompose.

你需要的是setWidgetOverride,用它来覆盖日历小部件的重绘,请参考更新的示例.

What you need is setWidgetOverride, use it to override redraw of calendar widget, please refer to the updated sample.

日历着色示例

这篇关于如何在zk中将数组值传递给javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 09:40