TX Text Control .NET Server

Javascript: DateFormField.setDate Method

Method|Introduced in 28.0

Description

Sets the DateFormField's date.

Syntax

<void> DateFormField.setDate(<Number> unixTime, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
unixTime

The date in Unix Time.

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.setDate in a practical document-editing workflow. It sets the DateFormField's date.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function configureDate(dateFormField) {
    dateFormField.setDate(
        1767225600,
        function() {
            console.log("set date completed.");
        },
        onTxError
    );
}