Skip to content

Instantly share code, notes, and snippets.

@neko-fire
Created April 14, 2014 19:38

Revisions

  1. neko-fire created this gist Apr 14, 2014.
    19 changes: 19 additions & 0 deletions Delivery date shopify
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    {{ 'http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css' | stylesheet_tag }}
    {{ '//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js' | script_tag }}

    <div style="width:300px; clear:both;">
    <p>
    <label for="date">Pick a delivery date:</label>
    <input id="date" type="text" name="attributes[date]" value="{{ cart.attributes.date }}" />
    <span style="display:block" class="instructions"> We do not deliver during the week-end.</span>
    </p>
    </div>

    <script>
    jQuery(function() {
    jQuery("#date").datepicker( {
    minDate: +1,
    maxDate: "+2M"
    } );
    });
    </script>