SetFormFieldDateFormat

Form fields

Description

Gives a form field Acrobat date formatting by writing the AFDate_KeystrokeEx / AFDate_FormatEx action pair onto its additional actions, so conforming viewers validate typed dates against the picture string and display them in that form. Returns 1 on success, or 0 when the field does not exist or DateFormat is empty.

Syntax

Delphi

Function TPDFlib.SetFormFieldDateFormat(Index: Integer; Const DateFormat: WideString): Integer;

Parameters

Index is the 1-based field index. DateFormat is an Acrobat date picture string such as mm/dd/yyyy, dd.mm.yyyy or yyyy-mm-dd.

Return Values

Returns 1 on success, or 0 when the field does not exist or a selector is out of range.

Remarks

Writes the AFDate_KeystrokeEx/AFDate_FormatEx action pair so viewers validate and normalise typed dates against the picture string.