
<div class="form-field form-field-options form-field-date{{#if required}} form-required{{/if}}"
  data-product-attribute="date">
  <span class="form-label">

    <span class="form-field-title">
      {{display_name}}
      {{#if required}}<span class="required-text">{{lang 'common.required'}}</span>{{/if}}
    </span>

    <span class="form-field-control">
      <span class="form-select-wrapper form-date-year">
        <select class="form-input form-select" name="attribute[{{id}}][year]" {{#if required}}required{{/if}} aria-required="{{required}}">
          <option disabled>{{lang 'forms.date.year'}}</option>
          {{#if earliest_year '===' latest_year}}
            <option value="{{$index}}" selected="selected">{{$index}}</option>
          {{else}}
            {{#for earliest_year latest_year}}
              <option value="{{$index}}" {{#if ../selected_date.year '==' $index}}selected="selected"{{/if}}>{{$index}}</option>
            {{/for}}
          {{/if}}
        </select>
      </span>

      <span class="form-select-wrapper form-date-month">
        <select class="form-input form-select" name="attribute[{{id}}][month]" {{#if required}}required{{/if}} aria-required="{{required}}">
          <option disabled>{{lang 'forms.date.month'}}</option>
          {{#for 1 12}}
            <option value="{{$index}}" {{#if ../selected_date.month '==' $index}}selected="selected"{{/if}}>{{getShortMonth $index}}</option>
          {{/for}}
        </select>
      </span>

      <span class="form-select-wrapper form-date-day">
        <select class="form-input form-select" name="attribute[{{id}}][day]" {{#if required}}required{{/if}} aria-required="{{required}}">
          <option disabled>{{lang 'forms.date.day'}}</option>
          {{#for 1 31}}
            <option value="{{$index}}" {{#if ../selected_date.day '==' $index}}selected="selected"{{/if}}>{{$index}}</option>
          {{/for}}
        </select>
        </span>
    </span>

  </span>
</div>
