<script type="text/javascript" data-cookieconsent="ignore">
_config.rangeDatepicker = true;
_config.dateRangeOverlay = true;
</script>
{% if housePackageContainer is defined and tvbPackage is not defined %}
{% set tvbPackage = housePackageContainer %}
{% endif %}
{% set isTVB = tvbPackage is defined ? true : false %}
<div id="date-overlay" class="overlay js-overlay js-date-range-overlay"
tabindex="-1"
role="dialog"
aria-label="{{ 'demi.search.choose-nights'|trans }}"
aria-hidden="true">
<form action="" class="js-booking-form">
{{ include('@ElementsDemiFrontend/Includes/overlays/sections/header.html.twig') }}
<div class="overlay__content">
<div class="ribbon mb-4 row row--gutter-width-1 bg-white">
<div class="col">
<div class="ribbon__item ribbon__item--date js-range-datepicker__from_container success">
<div>
{{ "demi.search.arrival"|trans }}
</div>
<div class="ribbon__title js-date-range-overlay__from-date-text">
{% set anreise = carbon().create() %}
{{ elements_dateFormat(anreise, 'date-long') }}
</div>
<div class="js-date-range-overlay__from-day-text">
{{ anreise|date('%a') }}
</div>
</div>
</div>
{% if not isTVB %}
<div class="col col-auto d-flex">
<div class="ribbon__item ribbon__item--nights ribbon__item--has-flag text-center js-date-range-overlay__nights-container">
<div class="ribbon__title js-date-range-overlay__nights-count">
1
</div>
<div class="js-date-range-overlay__nights-text">
{{ "demi.night"|trans }}
</div>
</div>
</div>
<div class="col">
<div class="ribbon__item ribbon__item--date text-right js-date-range-overlay__to-container">
<div>
{{ "demi.search.departure"|trans }}
</div>
<div class="ribbon__title js-date-range-overlay__to-date-text">
{% set abreise = carbon().create().addDay(7) %}
{{ elements_dateFormat(abreise, 'date-long') }}
</div>
<div class="js-date-range-overlay__to-day-text">
{{ abreise|date('%a') }}
</div>
</div>
</div>
{% endif %}
</div>
<div class="container">
{% if isTVB %}
<script type="text/javascript" data-cookieconsent="ignore">
_config.datepicker = true;
</script>
{% set nextArivalDay = demi_getNextPossibleArrivalDay(tvbPackage) %}
<div class="js-datepicker">
<div class="js-datepicker__input js-date-range-overlay__datepicker" data-available-ranges="jep" data-datepicker-min-date="{{ nextArivalDay ? elements_customDateFormat(nextArivalDay) : '' }}">
<input type="hidden" class="js-datepicker__alt-field" name="from" value="{{ elements_customDateFormat(anreise) }}">
</div>
</div>
{% else %}
<div class="js-range-datepicker js-date-range-overlay__datepicker datepicker--range">
<input type="hidden" class="js-range-datepicker__from" name="from" value="">
<input type="hidden" class="js-range-datepicker__to" name="to" value="">
<div class="js-range-datepicker__picker"></div>
</div>
{% endif %}
<div class="js-date-range-overlay__range-messages mt-4"></div>
<div class="mt-4">
<div class="js-date-range-overlay__arrival-msg text-center">
<span class="demi-icon icon-in-text demi-icon-info-circle text-muted"></span>
{{ "demi.search.select-arrival" | trans }}
</div>
<div class="js-date-range-overlay__departure-msg text-center" hidden>
<span class="demi-icon icon-in-text demi-icon-info-circle text-muted"></span>
{{ "demi.search.select-departure" | trans }}
</div>
<div class="js-date-range-overlay__submit text-right" hidden>
<button type="button" class="btn btn-primary js-overlay__commit">
{{ "demi.ok" | trans }}
</button>
</div>
</div>
</div>
</div>
</form>
</div>