# Numeric Range from javascript

**URL:** <https://forum.bubble.io/t/numeric-range-from-javascript/212700>\
**Category:** Plugins\
**Created:** [June 24, 2022, 9:13am UTC](https://forum.bubble.io/t/numeric-range-from-javascript/212700 "2022-06-24T09:13:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aroba](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aroba/32/135116_2.png) [@aroba](https://forum.bubble.io/u/aroba)\
**Post date:** [June 24, 2022, 9:13am UTC](https://forum.bubble.io/t/numeric-range-from-javascript/212700/1 "2022-06-24T09:13:17Z")

</div>

Hi all, I’m trying to instanciate a Numeric range from javascript. There are couple of examples for range dates but not numeric.  
I’m using the toolbox plugin and my “Run Javascript” contains the following:

 ![Screenshot 2022-06-24 at 11.10.29](https://us1.discourse-cdn.com/bubble/original/3X/f/8/f834a2d11bd12b42fb6fbcbca58cb0993e0bd3e4.png)  
Where getdefaultdayrange is a javascript to bubble element:  
 ![Screenshot 2022-06-24 at 11.11.40](https://us1.discourse-cdn.com/bubble/original/3X/4/1/417db496c866a9b9aa3b0175f2e7757fe111b97b.png)  
The call seems to work but returned range is always [0,0] instead of [540,1080]…  
 ![Screenshot 2022-06-24 at 11.12.19](https://us1.discourse-cdn.com/bubble/original/3X/9/6/9636accf53d39983154e23e8710cdfa033728962.png)

Any idea?

---

<div class="post-metadata">

**Author:** ![aroba](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aroba/32/135116_2.png) [@aroba](https://forum.bubble.io/u/aroba)\
**Post date:** [June 24, 2022, 12:29pm UTC](https://forum.bubble.io/t/numeric-range-from-javascript/212700/2 "2022-06-24T12:29:44Z")

</div>

Find out it was not related to the type but to a bug in Javascript To Bubble… Explanation can be found there:

> [@Bubble\_fn not setting JS to Bubble element value in Toolbox plugin](http://forum.bubble.io/t/bubble-fn-not-setting-js-to-bubble-element-value-in-toolbox-plugin/93944):
>
> Hi, I am using “JS to Bubble” element of Toolbox plugin, but unfortunately the value is not getting set into it. This is how elements are set up: This is my javascript code: [Screenshot 2020-05-27 at 12.31.28 AM] This is what I see in console: [Screenshot 2020-05-27 at 12.31.13 AM] What am I doing wrong? Funnily, there is another “JS to bubble” element in the same page, which is working. I tried to check ever…
