Copy link to clipboard
Copied
Canvas component NumericStepper
How to set max and min programmatically?
$("#InstanceName")[0].min = newMinValue;
$("#InstanceName")[0].max = newMaxValue;
However, these will not take effect if you place the script in the same frame when you add the component.
You'll need to place the script in next frame after adding the component.
Or, you can use it like below, which enforces the above script to be run only in the next frame after adding the component:
this.on("tick", function () {
$("#InstanceName")[0].min = newMinValue;
$("#InstanceName")[0].max = newMaxValue
...Copy link to clipboard
Copied
$("#InstanceName")[0].min = newMinValue;
$("#InstanceName")[0].max = newMaxValue;
However, these will not take effect if you place the script in the same frame when you add the component.
You'll need to place the script in next frame after adding the component.
Or, you can use it like below, which enforces the above script to be run only in the next frame after adding the component:
this.on("tick", function () {
$("#InstanceName")[0].min = newMinValue;
$("#InstanceName")[0].max = newMaxValue;
}, this , true);
Copy link to clipboard
Copied
Thank you very much