{% load static %}
{% load i18n %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.js"></script>

<script>
$(document).ready(function(){

$('.input-daterange').datepicker({
format: 'dd-mm-yyyy',
startDate: new Date(),
todayHighlight: true,
autoclose: true,
calendarWeeks : true,
clearBtn: true,
disableTouchKeyboard: true
});

});
</script>

<div>
    <style scoped>
        @import "{% static 'css/dateselect.css'%}";
    </style>



    <div class="container px-1 px-sm-5 mx-auto">
    <form method="post" autocomplete="off">
        {% csrf_token %}
{% if messages %}
<ul class="messages">
    {% for message in messages %}
    <li  {% if message.tags %} class=" {{ message.tags }} " {% endif %}> {{ message }} </li>
    {% endfor %}
</ul>
{% endif %}
        <div class="flex-row d-flex justify-content-center">
            <div class="col-lg-6 col-11 px-1">


                <div class="pb-3 input-group input-daterange">
                    {{form.check_in}}
                    <label class="ml-3 form-control-placeholder" id="start-p" for="check_in">Start Date</label>
                    <span class="fa fa-calendar" id="fa-1"></span>
                    {{form.check_out}}
                    <label class="ml-3 form-control-placeholder" id="end-p" for="check_out">End Date</label>
                    <span class="fa fa-calendar" id="fa-2">
                    </span>
                </div>
                <div class="input-group ">
                     {{form.room_category.errors}}
                     <label class="ml-3" for="room_category">Room Category  : </label>
                    {{form.room_category}}
                </div>
                <div class="m-5">
                     <button class="mx-sm-0 btn btn-primary col-md-5 mw-50" type="submit">
              BooK Now!
            </button>
                </div>

            </div>
        </div>
    </form>
</div>
</div>
</div>