Datebox

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.

<datebox lenient="true" image="newButton.jpg" buttonVisible="false" />
<datebox lenient="false" compact="false" buttonVisible="true" />

Class Name

org.zkoss.zul.Datebox

Supported Child Components

*NONE

Supported Events

Name

Event Type

OnClick

org.zkoss.zk.ui.event.MouseEvent

Description: Denotes user has clicked the component.

OnSelection

org.zkoss.zk.ui.event.SelectionEvent

Description: 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

org.zkoss.zk.ui.event.Event

Description: Denotes when a component gets the focus.

OnBlur

org.zkoss.zk.ui.even.Event

Description: Denotes when a component loses the focus.

OnChange

org.zkoss.zk.ui.even.InputEvent

Description: An input control notifies the application with the onChange event if its content is changed

by the user.

OnChanging

org.zkoss.zk.ui.even.InputEvent

Desczription: An input control also notifies the application with the onChanging event, when user is

changing the content.

Attributes

Property

Description

Data Type

Default Value

image

the URI of the button image

Values: url

String

<empty string>

lenient

whether or not date/time parsing is to be lenient

With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match this object's format.

With strict parsing, inputs must match this object's format

Values:true|false

Boolean

true

compact

whether to use a compact layout

Values:true|false

Boolean

false

buttonVisible

whether the button (on the right of the textbox) is visible

Values:true|false

Boolean

true

timezone

the time zone that this date box belongs to, or null if the default time zone is used.

java.util.TimeZone

<null>

Value

the value (in Date)

java.util.Date

<empty string>

Methods

Name

Description

Data Type

getDateFormat()

Returns the date format of the specified format Default: it uses SimpleDateFormat to format the date.

java.text.Dateformat

getDefaultFormat()

Returns the default format, which is used when constructing a datebox.

String

getRealStyleFlags()

Returns RS_NO_WIDTH|RS_NO_HEIGHT

int

GetInnerAttrs()

String

getOuterAttrs()

String

Inherited From