Datebox"

From Documentation
Line 10: Line 10:
 
An edit box for holding a date. After click on the calender, a <tt>calender</tt> will pop-up for inputting date.
 
An edit box for holding a date. After click on the calender, a <tt>calender</tt> will pop-up for inputting date.
  
Mouseless Entry <tt>datebox</tt>
+
== Mouseless Entry <tt>datebox</tt> ==
  
Alt+DOWN to pop up the <tt>calendar.</tt>
+
* Alt+DOWN to pop up the <tt>calendar.</tt>
  
LEFT, RIGHT, UP and DOWN to change the selected day from the <tt>calendar.</tt>
+
* LEFT, RIGHT, UP and DOWN to change the selected day from the <tt>calendar.</tt>
  
ENTER to activate the selection by copying the selected day to the <tt>datebox</tt> control.
+
* ENTER to activate the selection by copying the selected day to the <tt>datebox</tt> control.
  
Alt+UP or ESC to give up the selection and close the <tt>calendar</tt>.
+
* Alt+UP or ESC to give up the selection and close the <tt>calendar</tt>.
  
 +
== The First Day of the Week ==
 +
 +
The first day of the week is decided by the locale (actually the return value of the <tt>getFirstDayOfWeek</tt> method in the <tt>java.util.Calendar</tt>).
 +
 +
Since 5.0.3, you can control the first day of the week by use of the session attribute and the library property. Please refer to [http://docs.zkoss.org/wiki/Internationalization#The_First_Day_of_the_Week The First Day of the Week] for details.
  
 
= Example =
 
= Example =

Revision as of 05:00, 15 June 2010

Datebox

Employment/Purpose

An edit box for holding a date. After click on the calender, a calender will pop-up for inputting date.

Mouseless Entry datebox

  • Alt+DOWN to pop up the calendar.
  • LEFT, RIGHT, UP and DOWN to change the selected day from the calendar.
  • ENTER to activate the selection by copying the selected day to the datebox control.
  • Alt+UP or ESC to give up the selection and close the calendar.

The First Day of the Week

The first day of the week is decided by the locale (actually the return value of the getFirstDayOfWeek method in the java.util.Calendar).

Since 5.0.3, you can control the first day of the week by use of the session attribute and the library property. Please refer to The First Day of the Week for details.

Example

ZKComRef Datebox Example.PNG

 <datebox lenient="true" buttonVisible="false" />
 <datebox lenient="false" compact="false" buttonVisible="true" />


Supported events

Name
Event Type
onClick
Event: MouseEvent

Denotes user has clicked the component.

onChange
Event: InputEvent

An input control notifies the application with the onChange event if its content is changed by the user.


onChanging
Event: InputEvent

An input control also notifies the application with the onChanging event, when user is changing the content.

onSelection
Event: SelectionEvent

Denotes that user is selecting a portion of the text of an input component. You can retrieve the start and end position of the selected text by use of the getStart and getEnd methods.

onFocus
Event: Event

Denotes when a component gets the focus.

onBlur
Event: Event

Denotes when a component loses the focus.


Supported Children

Name
Event Type
None None

Use cases

Version Description Example Location
     

Version History

Version Date Content
     



Last Update : 2010/06/15

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.