Forum

Thread tagged as: Question, Configuration, Forms

datepicker in form app

Will a query, javascript date picker work in a form in the form app? Have tried numerous versions and although some work in normal form I can't get them with the perch:form.

Is this just impossible?

Denise

Denise Courtney

Denise Courtney 0 points

  • 6 years ago

Hi Denise

It's totally possible. I would get an plain old html page working first then convert to Perch. It saves a lot of hassle. At the end of the day a Perch form is just the same as an html form once it hits the browser.

I'm currently using the Bootstrap datepicker.js on this development site: https://staging.embersfireplaces.co.uk/fireplace-servicing

Look to see if you've got any Javascript errors in your web browser's console. A non-loading external file is often the culprit.

The javascript just picks up the class of "datepicker dropdown" and then does its work.


<p><label for="date">What date is your service due? You can just enter the installation date.</label><perch:input type="date" id="date" class="datepicker dropdown" label="Date" placeholder="Please enter a date" data-date="2015-04-01" data-date-format="yyyy-mm-yy" mailer="SDATE" /><perch:error for="date" type="format"> <span class="error">Please enter a valid date</span> </perch:error> </p>