Support Center

Create Calendar Field on Product Page

On this page

You can create a calendar type field in your products for when you need your customers to enter a date.

Step 1

Create a Product Option “Text input” type in your product with the label you want to appear on your product page.

Step 2

Go to your store’s code editor in “Themes>Code Editor”. Inside the editor you must open the Product Template and copy/paste the next 2 lines of the code at the beginning of the file:

<link rel="stylesheet" href="//">
<script src="//"></script>

Step 3

In the same file worse now the end of the page, you should copy/paste the following code:

      minDate: '+1d',
      dateFormat: 'dd-mm-yy'

The `minDate: '+1d'` variant indicates that visitors can only choose one day after the current one. You can modify it for more days or just delete that line if you if you agree to choose the current day.

The `dateFormat: 'dd-mm-yy'` variant defines the date format that the field accepts in the example: "day-month-year". You can edit the order.

Step 4

The last step is to identify the ID of the field you created in step 1. In your browser you should right click on the field, which in our example is “Select your date”, then click on “Inspect”. A panel with the code of your store will open, in this code we must copy the number that appears in id=”0123456” and paste it in the code editor instead of name_of_your_field in the code that we paste in the step 3. With this step the date type field is already created.

Start your journey with us!

Free trial for 14 days. No credit card required.