asked on November 6 Show version history

One of our clients has asked us about the fact that if you take an HTML Field and put a variable in it from a Date field, the date automatically gets converted into YYYY-MM-DD format no matter what format the Date field had. From what I am aware, that format is controlled by the region locale and Laserfiche has no control over it or a way to directly edit it. Is that correct?

 

I did end up using a workaround where I added a hidden Single Line field, used JavaScript to store the Date value as text in the Single Line Field, and put the Single Line field in the HTML instead, but I am wondering if there is a simpler solution to this.

 

Code example,:

LFForm.onFieldChange(function() { 
                let date = LFForm.getFieldValues({fieldId: 13});
                LFForm.setFieldValues( {fieldId: 16}, date.dateStr);
}, {fieldId: 2});

 

0 0