Shopify themes, liquid, logos, and UX
Hello there!
I have added custom code to add a 'delivery date picker' to my cart page. I want to make this a required step on my cart page so that the customer cannot proceed to checkout without selecting a date. Can anyone help?
Thank you!
Ciara
hI @CiaraChezCheese ,
Welcome to the Community.
Its a time consuming task as I understand. and If you are not having coding knowledge then we will help achieve your task easily and more cost-effectively if you are looking for task quickly & effectively!
you can check our store. https://www.oscprofessionals.com/
You can directly get connected with me via email or Skype.
Hi Cirara,
This can be a little tricky depending on how your theme is structured and which date picker you're using.
If you have some Javascript knowledge, your best bet would be to add an event listener to the <form> on the cart page, and run some validation when the form is submitted.
That is how we provide this option with our Bloom date picker app. The code would be something like:
document.body.addEventListener("submit", function (e) {
if (e.target.getAttribute("action") === "/cart") {
if (document.querySelector('#ID-OF-DATEPICKER-FIELD').value === "") {
e.preventDefault();
e.stopPropagation();
alert("Please select a delivery date");
return false;
}
}
});
This should work for pretty much every theme.
Hope this helps! Best of luck.
Hi there,
The delivery date picker is included in the cart when using our app Store Pickup & Delivery
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025