{#
/**
 * Date Html, selector style :
 * @var $name
 * @var $coreClass
 * @var $dateoutput
 * @var $mindate
 * @var $maxdate
 * @var $dateformatdetails
 * @var $dateformatdetailsjs
 * @var $hidetip
 * @var $dateTimeWidget // by passing that over here the tempus dominus datepicker is automatically loaded
 */
#}

<!-- Date, selector layout -->

<!-- answer -->
<div class='{{ coreClass }} mb-3 row g-1 align-items-center'>
    <div class="col-12 col-sm-auto">
        <label for='answer{{ name }}' class='visually-hidden control-label'>
            {{ sprintf(gT('Date format: %s'), dateformatdetails) }}
        </label>
        <div id="answer{{ name }}_datetimepicker" class="input-group answer-item date-timepicker-group"
             data-basename="{{ name }}"><!-- data-basename used in js function -->
            {{ C.Html.textField(name,dateoutput,{
                'id' : "answer" ~ name,
                'class' : "form-control date-control date",
                'aria-describedby' : "ls-question-text-" ~ name,
            }) }}
            <div class="input-group-addon btn btn-primary">
                <i class="fa fa-calendar ri-calendar-2-fill" aria-hidden="true"></i>
                <span class="visually-hidden"> {{ gT("Open date/time selector") }}</span>
            </div>
        </div>
        {% if(hidetip) %}
            <p class="tip help-block" aria-hidden='true'>
                {{ sprintf(gT('Format: %s'),dateformatdetails) }}
            </p>
        {% endif %}
    </div>
</div>

<div class="d-none" style='display:none'>
    <!-- Obs: No spaces in the div - it will mess up Javascript string parsing , EM replacement done in qanda -->
    <div id='datemin{{ name }}'>{{ processString(mindate) }}</div>
    <div id='datemax{{ name }}'>{{ processString(maxdate) }}</div>
    <div id='dateformat{{ name }}'>{{ dateformatdetailsjs }}</div>
</div>
<!-- end of answer -->
