跳到主要内容

Set USA date format

Description

Sets all date form formats to USA one.

(function()
{
var document = Api.GetDocument();

//Get all forms from the document
var allForms = document.GetAllForms();
allForms.forEach(form => {
//For each Date form set USA date format
if(form.GetFormType() == "dateForm") {
form.SetFormat("mmmm dd, yyyy");
}
});
})();

Methods used: GetDocument, GetAllForms, GetFormType, SetFormat

Result

Set USA Date Format