Hello everyone,
I implemented a jQuery datepicker to my project, using the technique in this post.
For now, everything works just fine. But here is the catch:
I’m using Snipcart and I’d like to add this datepicker in the shipping-method section.
As soon as I copy/paste the code in the custom code (in the project settings) inside the snipcart tags, the calendar doesn’t pop up anymore.
I hope someone can help me fix this !
To see where it is in the published site:
- Go to the published site
- Add something in the cart
- Open cart & go to checkout
- Fill the form with random values & go to the next step
- Next step once again
- It’s here, just below the shipping method list
And here is the pasted code:
<head>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
...
</head>
<body>
...
<shipping-method section="bottom">
<fieldset class="snipcart-form__set">
<div class="snipcart-form__field">
<div id="datepicker">
<input class="w-input" id="datepick-res" type="text" placeholder="Select Date" name="field" required="required">
</div>
</div>
</fieldset>
</shipping-method>
...
<script src="https://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script>
$(document).ready(function() {
$( "#datepick-res" ).datepicker();
});
</script>
</body>
Thanks a LOT
Here is my site Read-Only: LINK
Here is the published site: LINK