Added Date Range Selector and Page is No Longer Working in Editor

I just added the new Date Range Selector element to a page and have been trying to configure it with custom javascript. Since doing so, the page is getting frozen in the editor and I can’t do much of anything.

Hi @kyanaloe, have you tried removing the custom javascript and refreshing the page?

There might be a conflict between your custom code and the app.

May I ask what you are trying to configure with custom code? It would be a good learning for us.


I removed the custom code and the editor started working again, thank you, @Joyce

I was trying to code it so that the end date was initially set as the start date plus 1 hr.

1 Like

You can bind the end date to a value calculated in this way:

  • create a date object with the start date
  • get start date timestamp
  • add 60 * 60 * 1000 milliseconds
  • create a new date with this value
1 Like

Thanks, @dorilama

I tried that but the editor crashed on me again. I guess the date range picker doesn’t like me messing with it!

This is strange. I tried it in the editor before posting and it worked.
Do you have any other element/option bound with the date range values? Maybe you are creating a circular dependency and the editor is freezing because of an infinite loop.

1 Like

Yes, I’d investigate as @dorilama suggests.

It’s not really the WeWeb editor crashing but the website browser.

Web browsers will crash when:

  • the browser is trying to load too much data, as in the volume of data is too big
  • the browser is trying to process too much information, as in it’s going through an infinite loop that never stops
1 Like

There is actually something strange happening.
As soon as I bind the end date with the formula an infinite loop is generated. It happens also in a clean project.
Also if I reload the editor the browser freezes with the same error, but with the browser dev tool open there is no error and the date range works as expected in preview mode.
This is the editor if you want to take a look: Editor - WeWeb.

1 Like

Nice catch! Creating a bug ticket now.

1 Like