Calendar"

From Documentation
(Calendar a11y)
 
Line 6: Line 6:
 
   since 9.5.0
 
   since 9.5.0
  
== Required Settings ==
+
 
 
{{ZKComponentReferenceAccessibilityNamingReference}}
 
{{ZKComponentReferenceAccessibilityNamingReference}}
  

Revision as of 07:35, 28 September 2020

Calendar

  • Available for ZK:
  • http://www.zkoss.org/product/zkhttp://www.zkoss.org/whyzk/zkeeVersion ee.png
 since 9.5.0


Label a Component

To name a component with ARIA attribute by adding the aria-label client attribute to the component, please refer to ZK_Developer's_Reference/Accessibility#Specify_ARIA_Attributes

Keyboard Support

Key
Description
ArrowUp / ArrowDown / ArrowLeft / ArrowRight Navigate the date.
Enter / Spacebar Select the date.

Calendar Day AriaLabel Renderer

This is achieved by overriding the default renderer at the client to customize the aria-label of days on ZK's Calendar.

<zk>
	<script><![CDATA[
		zk.afterLoad('zul.db', function(){
			zul.db.Renderer.cellAriaLabel = function (cal, y, m, day, monthofs, dayofweek) {
				var localizedSymbols = cal.getLocalizedSymbols();
				return day + ' ' + localizedSymbols.FMON[m] + ', ' + y; // dd MMMM, yyyy
			};
		});
	]]></script>
	<calendar/>
</zk>
[Since 9.5.0]