
/* Custom CSS theme */
<link rel="stylesheet" href="https://djqizrxa6f10j.cloudfront.net/apps/customizations/11997248/datepicker/style.css">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
const datesUnavailable = ["Dec 23, 2022", "Dec 24, 2022"];

const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];

function unavailable(date) {
    let dmy = monthNames[date.getMonth()] + " " + date.getDate() + ", " + date.getFullYear();
		let day = date.getDay();
    if ($.inArray(dmy, datesUnavailable) == -1 ) {
        return [true, ""];
    } else {
        return [false, "", "Unavailable",];
    }
} 

function todayUnavailable(date) {
  let hours = date.getHours();
  let minutes = date.getMinutes();
  if (hours >= 18 && minutes >= 0) {
    return '+2'
  } else {
    return '+1'
  }
} 

Ecwid.OnPageLoaded.add(function(page) {
    if ("CHECKOUT_SHIPPING_ADDRESS" == page.type) {

        let delivery_date_field = document.querySelector('.ecwid-AddressForm-city-line input');
        delivery_date_field.readOnly = true;
        delivery_date_field.style.width = '255px';

        $('.ecwid-AddressForm-city-line input').datepicker({
        dateFormat: "M d, yy",
        showOn: "both",
        minDate: todayUnavailable(new Date()),
        buttonImage: 'https://djqizrxa6f10j.cloudfront.net/apps/customizations/6542088/datepicker/icon.png',
        inline: 'true',
        beforeShowDay: unavailable
        });
    }
} );
</script>


html#ecwid_html body#dmRoot .ec-size .ec-store .form-control__button-text {
    color: white!important;
} .ec-size .ec-store .grid-product__buy-now .form-control__button:hover{background:#60f !important;color:white !important}
 .ec-size .ec-store .form-control--animated.form-control--done .form-control__button-text,html#ecwid_html body#dmRoot .ec-size .ec-store .form-control--animated.form-control--done .form-control__button-svg{color:white !important}
 .horizontal-menu-container.horizontal-desktop .horizontal-menu-item>a span{color:white !important}
 .ecwid div,.ecwid span,.ecwid a,.ecwid p{font-family:Quicksand !important}
 .ecwid div,.ecwid span,.ecwid a,.ecwid p{color:#262626 !important}
 .ec-size .ec-store .form-control--primary .form-control__button{background-color:black}
 .ec-size .ec-store .details-product-purchase__add-buttons .form-control__button{background:#6600FF}
 .ec-size .ec-store .grid-product__buy-now .form-control__button{background:#6600FF}
 .horizontal-menu-container.horizontal-desktop nav.horizontal-menu{background:#6699ff}
 html#ecwid_html body#dmRoot .ec-size .ec-store .form-control__button-text{color:white !important}
 