[Pas2js] How to insert inline {}
Ondrej Pokorny
lazarus at kluug.net
Thu Jan 26 12:01:05 CET 2023
Hello,
I'd like to use the DateTimePicker from https://getdatepicker.com .
I declared an external class
TJSTempusDominus = class external name
'tempusDominus.TempusDominus'(TJSObject)
public
constructor new(aElement: TJSElement);
constructor new(aElement: TJSElement; aOptions: TJSObject);
end;
a simple constructor without options works fine:
fDateTimePicker := TJSTempusDominus.new(myElement);
Can I somehow add inline options { my-property: false }?
JS-code:
window.datetimepicker1 = new tempusDominus.TempusDominus(
document.getElementById('datetimepicker1'), { my-property: false } );
Or is there a different way how to solve this?
Thanks
Ondrej
More information about the Pas2js
mailing list