Wt 3.1.10
Public Member Functions
Wt::Ext::DateField Class Reference

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

#include <Wt/Ext/DateField>

Inheritance diagram for Wt::Ext::DateField:
Inheritance graph
[legend]

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

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()
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Sat Dec 24 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4