-
New Feature
-
Resolution: Done
-
Normal
-
7.0.0
-
Security Level: Jimmy
-
ZK 8.0.1
-
None
a button in the calendar popup of datebox to jump to today
this example shows a prototypic implementation, based on ZK 6.5.4, but feature is not required before ZK7
- the "today"-link might be an icon or needs further localization, when text based
- it should be possible to enable/disable the button
<zk> <script> zk.afterLoad('zul.db', function () { var _xRenderer = {}; zk.override(zul.db.Renderer, _xRenderer, { titleHTML: function (wgt, out, localizedSymbols) { _xRenderer.titleHTML.apply(this, arguments); //call the original method var uuid = wgt.uuid, view = wgt._view, text = wgt.getZclass() + '-ctrler'; if(view == 'day') { out.push('<span id="', uuid, '-today" class="', text, '"', ' onClick="var cal = zk.Widget.$(\'$', wgt.parent.id, '\')._pop; cal._value = null; cal._setTime();"', ' >', ' today', '</span>'); } } }); }); </script> <datebox id="db" onChange=""></datebox> </zk>