Class DateField

A date editor component that can be bound to any bindable Property. that is compatible with java.util.Date.

Since DateField extends AbstractField it implements the com.itmill.toolkit.data.Buffered interface. A DateField is in write-through mode by default, so com.itmill.toolkit.ui.AbstractField must be called to enable buffering.

Synopsis

VERSION@

Since

3.0

Inheritance Path.  java.lang.Object-> com.itmill.toolkit.ui.AbstractComponent -> com.itmill.toolkit.ui.AbstractField -> com.itmill.toolkit.ui.DateField

DateField()

Constructs an empty DateField with no caption.

DateField(Property)

Parameters

dataSource

the Property to be edited with this editor

Constructs a new DateField that's bound to the specified Property and has no caption.

DateField(String)

Parameters

caption

The caption of the datefield.

Constructs an empty DateField with caption.

DateField(String, Date)

Parameters

caption

caption String for the editor

text

initial text content of the editor

Constructs a new DateField with the given caption and initial text contents. The editor constructed this way will not be bound to a Property unless setPropertyDataSource(com.itmill.toolkit.data.Property) is called to bind it.

DateField(String, Property)

Parameters

caption

caption String for the editor

dataSource

the Property to be edited with this editor

Constructs a new DateField that's bound to the specified Property and has the given caption String .

RESOLUTION_DAY

Resolution identifier: days.

RESOLUTION_HOUR

Resolution identifier: hours.

RESOLUTION_MIN

Resolution identifier: minutes.

RESOLUTION_MONTH

Resolution identifier: months.

RESOLUTION_MSEC

Resolution identifier: milliseconds

RESOLUTION_SEC

Resolution identifier: seconds.

RESOLUTION_YEAR

Resolution identifier: years.

getResolution()

Parameters

return

int

Returns the resolution.

setPropertyDataSource(Property)

Set DateField datasource. Datasource type must assignable to Date.

setResolution(int)

Parameters

resolution

The resolution to set

Sets the resolution of the DateField