Public Member Functions

Wt::Ext::DateField Class Reference
[Ext widgets]

A form field for conveniently editing a date using a calendar popup. More...

#include <Wt/Ext/DateField>

Inherits Wt::Ext::LineEdit.

List of all members.

Public Member Functions

 DateField (WContainerWidget *parent=0)
 Create a new date field.
void setFormat (const WString &format)
 Set the date format.
const WStringformat () const
 Return the date format.
void setDate (const WDate &date)
 Set the date value.
WDate date () const
 Return the date value.

Detailed Description

A form field for conveniently editing a date using a calendar popup.

You can set a WDateValidator to specify in more detail the valid range, and the client-side validation messages. When using a WDateValidator, however, make sure to use the same date format as the format used by the field.

Here is a snapshot taken on 01/09/2007 (shown as today), and with current value 12/09/2007 currently selected.

ExtDateField-1.png

DateField

See also:
Calendar, WDatePicker

Member Function Documentation

WDate Wt::Ext::DateField::date (  )  const

Return the date value.

When the date could not be parsed, an invalid date is returned (for which WDate::isValid() returns false).

const WString& Wt::Ext::DateField::format (  )  const [inline]

Return the date format.

See also:
setFormat()
void Wt::Ext::DateField::setFormat ( const WString format  ) 

Set the date format.

The syntax of the format string is the same as used by WDate::toString(const WString&).

The default value is 'dd/MM/yyyy'.

See also:
format()

Generated on Mon Nov 29 2010 08:03:20 for Wt by doxygen 1.7.1