RelativeDateItem drops default values

Somewhere within the last year SmartClient 13.1 introduced a regression where default values from RelativeDateItem are dropped from form’s values.

Test code:

isc.DynamicForm.create({
   ID: "exampleForm",
   width: 400, height: 350,
   fields: [
       {name: "text1", "type": "text", defaultValue: "dd"},
       {name: "text2", "type": "text", defaultValue: "dd"},
       {name: "date1", "type": "datetime", editorType: "RelativeDateItem", defaultValue: "$today"},
       {name: "date2", "type": "datetime", editorType: "RelativeDateItem", defaultValue: "$today"}
   ]
});
isc.VLayout.create({
    ID: "vLayout",
    members: [
        isc.Button.create({
            title: "Read values",
            click: function () {
                valuesLabel.setContents(isc.JSON.encode(exampleForm.getValues()))
            }
        }),
        isc.Button.create({
            title: "editRecord",
            click: function () {
                // the same happens with setValues
                exampleForm.editRecord({"text2": "dd", "date2": new Date(2026, 0, 15, 12, 0, 0)});
                valuesLabel.setContents(isc.JSON.encode(exampleForm.getValues()));
            }
        }),
        isc.Button.create({
            title: "editNewRecord",
            click: function () {
                exampleForm.editNewRecord();
                valuesLabel.setContents(isc.JSON.encode(exampleForm.getValues()));
            }
        }),
        isc.Label.create({
            ID: "valuesLabel"
        })
    ]
});
isc.HLayout.create({
    membersMargin: 50,
    members: [ exampleForm, vLayout ]
});

Outputs of exampleForm.getValues() call:

  • form is rendered - works correctly, all four fields are returned
  • after editRecord call, with a value for “text1” and “date1” omitted - “date1” disappeared
  • after editNewRecord:
    • when editRecord was previously called to set “date2” - “date2” is returned, but “date1” is missing
      • after a second editNewRecord call"date1" also disappears
    • when form was just rendered - both date date fields are missing

This worked correctly in v13.1p_2025-08-23/PowerEdition Deployment.

Broken in:

  • v13.1p_2026-08-08/AllModules Development Only
  • v14.1p_2026-08-11/AllModules Development Only

We see the issue and we’re taking a look.

Following up, this has been fixed in builds of 13.1+ since August 15.