Issues with new Date()

Hello,

I tried set the date to the current date with the code below like described in the doc here (https://plumsail.com/docs/forms-web/designer/fields/date.html#get-or-set-field-value).

fd.Rendered(function() {
    fd.field('Field1').value = new Date();
});

Bildschirmfoto 2024-10-30 um 14.42.16

This sounds pretty simple but I just can't get that to run at all.

Thanks Felix

Hello @felix,

Welcome to the Plumsail Community!

The code is case sensitive, please replace Rendered with rendered, and replace Field1 with the name of the field:

fd.rendered(function(){
    //replace Field1 with the name of the field
    fd.field('Field1').value = new Date();
});
1 Like

Good Morning @Margo,

yes the capital R broke it.

Thanks for the help and have a nice day,
Felix

1 Like