Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Datedropper javascript lightbox forms



Site URL: https://www.fieldandflorist.com/floral-delivery/sendflowers

Hey Ya'll — first off, I have really appreciated this whole community. Thank you for all your input on other user's posts.

I'm fairly new to coding and downloaded a .js date picker called datedropper — beautiful design if you haven't seen it. https://felixg.io/docs/products/datedropper-javascript. I'm trying to figure out how to get it to target and replace the date element in the lightbox form that pops up after you click 'Add to Cart' here: https://www.fieldandflorist.com/floral-delivery/sendflowers

I uploaded the js file to my site and attempted to install it to the header code injection of the page above with the code:

  <!-- datedropper -->
  <script src="datedropper-javascript.js"></script>

But I'm struggling to figure out the proper code formatting to get it to target and replace the date element in the lightbox form. The developer's page says to use this:

<input type="date">

<!-- datedropper init -->
new dateDropper({
  selector: 'input[type="date"]'

I believe that the element id is:

"date-yui_3_17_2_1_1603374970281_230035" class="form-item fields date required'

Any help would be appreciated. I'm super new to all of this. Thank you!


Link to post
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Posted Images

1 answer to this question

Recommended Posts

  • 0

The developer's guide assumes that you adding the control to an element that already exists on the page. However, it's slightly more complex on Squarespace because Product Forms don't exist on the page. They are only created after a selects variants and attempts to add a product to their cart. If they change their mind to select another variant, the code needs to be called again.

If you'd like an alternative datepicker that has been built to work exclusively on Squarespace, including Product Forms, and doesn't require you to understand code, you may find our Datepicker useful. 

For more information and live examples, see the datepicker product page.



Hi, I'm Paul, founder of SF Digitalbuilding the features that Squarespace didn't include. Pick dates in any format, show prices in other currencies, take orders without payment or improve your cartI value honesty, integrity, transparency and respect. Links in my posts may refer to SF Digital products or may be affiliate links.  Squarespace. I've been a loyal supporter of the platform since 2007. 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...