I’ve been building a site and we launched today. Everything was working propperly. Upon our launch, the date picker ceased working entirely. Any idea what the issue is?
{{ ‘cal.css’ | asset_url | stylesheet_tag }}
.custom.form__label{margin-bottom: 0.6rem}.field.custom{margin-top:0}.custom .field__input{padding-top:0.8rem;font-family: var(--font-body-family);color: rgba(var(--color-foreground),.75);font-size: 1.2rem;}
Delivery Date
Hi @cedishappy
Can you share the store URL
Hi Rishihuptech. Yes, sure.
petalsloft.com
Hi @cedishappy
Can you share the screenshot or link or section name where i can find the datepicker.
@Huptech-Web
here’s the link! Site is currently live with placeholder input field so I made a test product to replicate the JQuery UI issue: https://www.petalsloft.com/products/live-testing-product
Hi @cedishappy
The script you have added here: https://prnt.sc/X62uVWLs7Uxg for datepicker, you have defined wrong variables
Replace current script
// populate the array
for (var d = new Date(startDate); d <= new Date(endDate); d.setDate(d.getDate() + 1)) {
dateRange.push($.datepicker.formatDate('yy-mm-dd', d));
}
With below script
// populate the array
for (var d = new Date(holiday_startDate); d <= new Date(holiday_endDate); d.setDate(d.getDate() + 1)) {
dateRange.push($.datepicker.formatDate('yy-mm-dd', d));
}
@Huptech-Web thanks it works now! What a silly error. I had various issues with the other calendars on the site as well. You made me realize that I simply made syntax errors all over the place. Must have copy pasted the code wrongly right before the launch whoops…
Thank you, appreciate the help!
1 Like