CreateDateField
Creates a text date field.
Syntax
expression.CreateDateField(aRect);
expression - A variable that represents a Api class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| aRect | Required | Rect | widget rect |
Returns
Example
How to create and add a text field with date picker to document.
- Code
- Result
let doc = Api.GetDocument();
let page = doc.GetPage(0);
let dateField = Api.CreateDateField([10, 10, 160, 32]);
page.AddObject(dateField);
dateField.SetValue('01.01.2025');