Javascript: DateFormField.setEmptyWidth Method
Description
Sets the horizontal extension, in twips, of the date formfield, when it is empty.
Syntax
<void> DateFormField.setEmptyWidth(<Number> emptyWidth, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| emptyWidth | Specifies the horizontal extension, in twips, of the date formfield, when it is empty. When this parameter is set to 0, a default value is used. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates DateFormField.setEmptyWidth in a practical document-editing workflow. It sets the horizontal extension, in twips, of the date formfield, when it is empty.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureEmptyWidth(dateFormField) {
dateFormField.setEmptyWidth(
1440,
function() {
console.log("set empty width completed.");
},
onTxError
);
}