skip to Main Content

How could I add date time picker option in Shopify -> Store -> Customize -> Section Setting.

I want to add sliders to be displayed on scheduled basis. So created option there to enter the date time field. Now I wanted the datepicker should be visible when I click on that field, as usually it is done on the text boxes.

I tried to add a jQuery datepicker on the section. but it always shows as datepicker is undefined.

4

Answers


  1. There is no datepicker field in Shopify.

    You will need to use a standard text field and use it as a date base.

    Please refer to the docs for the available fields:

    Basic Input Settings

    Specialized input settings

    Login or Signup to reply.
  2. Added next fields to setting for same task. Very pity but liquid can’t insert variable to schema((

        {
          "type": "header",
          "content": "Start date"
        },
        {
          "type": "range",
          "id": "start_year",
          "label": "Year",
            "min": 2019,
            "max": 2023,
            "step": 1,
          "default": 2019
        },
        {
          "type": "range",
          "id": "start_month",
          "label": "Month",
            "min": 1,
            "max": 12,
            "step": 1,
          "default": 11
        },
        {
          "type": "range",
          "id": "start_day",
          "label": "Day",
            "min": 1,
            "max": 31,
            "step": 1,
          "default": 27
        },
        {
          "type": "range",
          "id": "start_hours",
          "label": "Hours",
            "min": 0,
            "max": 23,
            "step": 1,
          "default": 16
        },
        {
          "type": "range",
          "id": "start_minute",
          "label": "Minute",
            "min": 0,
            "max": 60,
            "step": 1,
          "default": 0
        }
    
    Login or Signup to reply.
  3. just wanted to give some update if someone is searching a Date Picker for the Product or Cart Page on Shopify.

    There are a lot of apps ready in the Appstore like:
    https://apps.shopify.com/date-picker

    For me and the Team this was very easy to use and has saved us a lot of developer work.

    Login or Signup to reply.
  4. There is no date picker in Shopify but you can get the date from settings like this way: ( place the code in you schema settings )

           {
                "type": "text",
                "id": "date_picker",
                "label": "Choose date",
                "default": "12-24-2022",
                "info": "e.g. mm-dd-yyyy"
            }
    

    And then just add or assign the date with a filter and I think you will get exactly what you wanted without the visual date picker like jQuery date picker

    {{ section.settings.date_picker | date: "%m-%d-%Y" }}

    Hope, this will help you. 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search