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.
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
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.
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
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.
Nice catch! Creating a bug ticket now.