Adding Date Picker Breaks Form

I have a form on a SPA child page that displays nicely. But as soon as I add a Datte Picker tthe form no longer shows up. I get the following error.

Hey Brad,
Have you added the moment.js framework to your page?

Hmmm, I added Moment and now the form renders but the datepicker doesn’t work. I now get this error:

Probably it’s the order the js files are included.
The moment js should be before the datepicker js includes in your head tags.

Still get the same error.

Even if I remove the datepicker I get the Moment error.

Gott it, had to add Moment to the master page instead of the child page.

1 Like

To clarify, what’s the official story with regards to child pages and frameworks? I’m guessing that we add them to the partial view so we can visually design our pages within Wappler. But really, these won’t be loaded when the page is fetched via XHR and all JS and (non-inline) CSS should be added to the master template.

You do not need to add them to the child pages.

Right, but for example, if I don’t add Bootstrap to the child page while developing, then I have no Bootstrap styles applied while creating the page…

They do if you create your child pages like in the documentation.

1 Like

Yeah, I was converting existing pages. I’m sure your child partials have Bootstrap etc. selected under Frameworks.

Yeah, if you do it the way the document shows through the Wappler UI it’s all good. No need to add the frameworks.