Difference between revisions of "Documentation/DevGuide/Basic/Date Field"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Documentation/Developers Guide/Basic and Dialogs)
m (FINAL VERSION FOR L10N)
Line 6: Line 6:
 
|NextPage=Documentation/DevGuide/Basic/Time Field
 
|NextPage=Documentation/DevGuide/Basic/Time Field
 
}}
 
}}
{{DISPLAYTITLE:Date Field}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Basic/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Date Field}}
 
The date field control <idl>com.sun.star.awt.UnoControlDateField</idl> extends the text field control and is used for displaying and entering dates. The date displayed in the date field is controlled by the <code>Date</code> property. The date value is of type <code>Long</code> and must be specified in the format YYYYMMDD, for example, the date September 30th, 2002 is set in the following format:
 
The date field control <idl>com.sun.star.awt.UnoControlDateField</idl> extends the text field control and is used for displaying and entering dates. The date displayed in the date field is controlled by the <code>Date</code> property. The date value is of type <code>Long</code> and must be specified in the format YYYYMMDD, for example, the date September 30th, 2002 is set in the following format:
  

Revision as of 12:37, 15 May 2009



The date field control com.sun.star.awt.UnoControlDateField extends the text field control and is used for displaying and entering dates. The date displayed in the date field is controlled by the Date property. The date value is of type Long and must be specified in the format YYYYMMDD, for example, the date September 30th, 2002 is set in the following format:

 oDateFieldModel = oDialog.Model.DateField1
 oDateFieldModel.Date = 20020930

The current date is set by using the Date and CDateToIso runtime functions:

 oDateFieldModel.Date = CDateToIso( Date() )

The minimum and the maximum date that the user can enter is defined by the DateMin and the DateMax property. The format of the displayed date is specified by the DateFormat and the DateShowCentury property, but the usage of DateShowCentury is deprecated. Some formats are dependent on the system settings. If the StrictFormat property is set to True, the date entered by the user is checked during input. The Dropdown property enables a calendar that the user can drop down to select a date.

Dropdown is currently not working.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages