<?php
//select flight name
$allFlightCode1 = mysqli_query($con,"SELECT * FROM airCode order by AirportName");
$allFlightCode2 = mysqli_query($con,"SELECT * FROM airCode order by AirportName");
//select hotel/city name
$allHotelName = mysqli_query($con,"SELECT * FROM hotelName order by hotelName"); 
?>
<!-- Tab Search Section -->
<div class="tab-search">
  <div class="base-tab-list">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <ul class="nav nav-pills justify-content-center" id="pills-tab" role="tablist">
            <li class="nav-item"> <a class="nav-link active" id="pills-flight-tab" data-toggle="pill" href="#pills-flight" role="tab" aria-controls="pills-flight" aria-selected="true"> <i class="fas fa-plane"></i>Flight</a> </li>
            <li class="nav-item"> <a class="nav-link" id="pills-hotel-tab" data-toggle="pill" href="#pills-hotel" role="tab" aria-controls="pills-hotel" aria-selected="false"> <i class="fas fa-hotel"></i>Hotel</a> </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  
    <div class="base-tab-content">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <div class="tab-content" id="pills-tabContent">
		 
            <div class="tab-pane fade show active" id="pills-flight" role="tabpanel" aria-labelledby="pills-flight-tab">
                 <form action="web/travel/searchFlightResult.php" method="get">
              <div class="base-find-flight">
                <div class="find-flight-form">
                  <div class="row">
                    <div class="col-md-12 col-lg-12">
                      <label class="radio-inline">
                      <input type="radio" name="tripType" id="inlineRadio1" value="1" checked="checked" onClick="shRtrip('oneway')">
                      One Way </label>
                 <!--     <label class="radio-inline">
                      <input type="radio" name="tripType" id="inlineRadio2" value="2" onClick="shRtrip('roundway')">
                      Round Trip </label>-->
                    </div>
                    
                    <div class="widgetSection">
                      <div class="inner-box">
                        <div class="searchCity hover-bg">
                          <label class="dropdown">
                          <div class="dd-button"> <span class="latoBold ">From</span>
                            <div class="input-group input55">
                              <select class="form-control hasDatepicker" id="country1" name="origin" required>
                                <option selected="selected" value="">&nbsp;Select&nbsp;Origin&nbsp;&nbsp;&nbsp;</option>
                                <?php while($flightCode=mysqli_fetch_array($allFlightCode1)){?>
						   <option value="<?php echo $flightCode['Code']?>"><?php echo $flightCode['AirportName']." - ".$flightCode['Code']?></option>
									<?php }?>
                              </select>
                            </div>
                          </div>
                          </label>
                          <div class="swipCircle"> <span class="swipIcon"> <i class="fa fa-plane" aria-hidden="true"></i> </span> </div>
                        </div>
                        <div class="searchCity hover-bg">
                          <label class="dropdown">
                          <div class="dd-button"> <span class="latoBold ">To</span>
                            <div class="input-group input55">
                              <select class="form-control hasDatepicker" id="country2" name="destination" required>
                                <option selected="selected" value="">&nbsp;Select&nbsp;Destination&nbsp;&nbsp;&nbsp;</option>
                                <?php while($flightCode=mysqli_fetch_array($allFlightCode2)){?>
						   <option value="<?php echo $flightCode['Code']?>"><?php echo $flightCode['AirportName']." - ".$flightCode['Code']?></option>
									<?php }?>
                              </select>
                            </div>
                          </div>
                          </label>
                        </div>
                        <div class="searchCity d-flex">
                          <div class="dates hover-bg" style="max-width:100%; flex:0 0 100%; border:0;">
                            <label class="dropdown">
                            <div class="dd-button"> <span class="latoBold">Date <i class="fa fa-chevron-down" aria-hidden="true"></i></span>
                              <div class="input-group input55">
                                <input type="text" id="departure_date" name="departDate" class="form-control" placeholder="DD/MM/YYYY" required autocompleted="off">
                              </div>
                              <p data-cy="" class="day-name font20"></p>
                            </div>
                            </label>
                          </div>
                          <div class="dates hover-bg" style="border: 0; display:none;">
                            <label class="dropdown">
                            <div class="dd-button"> <span class="latoBold">Check Out <i class="fa fa-chevron-down" aria-hidden="true"></i></span>
                              <div class="input-group input55" id="roundTrip" style="display:none">
                                <input type="text" id="return_date" name="return_date" class="form-control" value="04/17/2021" placeholder="DD/MM/YYYY" autocompleted="off">
                              </div>
                              <p data-cy="" class="day-name font20"></p>
                            </div>
                            </label>
                          </div>
                        </div>
                        <div data-cy="" class="searchCity hover-bg">
                          <label class="dropdown">
                          <div class="dd-button"> <span class="latoBold">Travellers &amp; CLASS</span>
                            <div class="d-flex-22">
                              <div class="bb-11">
                                <label><i class="fa fa-users" aria-hidden="true"></i></label>
								<input type="hidden" name="OutBoundTime" value="00:00:00">
                                <select class="form-control hasDatepicker" id="NoOfAdutls" name="NoOfAdutls" tabindex="7" required>
                                  <option selected="selected" value="0">Adult</option>
                                  <option  value="1">1</option>
                                  <option value="2">2</option>
                                  <option value="3">3</option>
                                  <option value="4">4</option>
                                  <option value="5">5</option>
                                  <option value="6">6</option>
                                  <option value="7">7</option>
                                  <option value="8">8</option>
                                  <option value="9">9</option>
                                </select>
                              </div>
                              <div class="bb-11">
                                <label><i class="fa fa-child" aria-hidden="true"></i></label>
                                <select class="form-control hasDatepicker" id="NoOfChilds" name="NoOfChilds" tabindex="8" required>
                                  <option selected="selected" value="0">Children</option>
                                  <option  value="0">0</option>
                                  <option value="1">1</option>
                                  <option value="2">2</option>
                                  <option value="3">3</option>
                                  <option value="4">4</option>
                                  <option value="5">5</option>
                                  <option value="6">6</option>
                                  <option value="7">7</option>
                                  <option value="8">8</option>
                                </select>
								<input type="hidden" name="NoOfInfants" value="0">
                              </div>
                            </div>
                            <div class="d-flex-22">
                              <div class="bb-111">
                                <select id="CabinClass" name="CabinClass" class="form-control hasDatepicker" tabindex="10" required>
                                  <option value="1" selected="selected">Economy</option>
                                  <option value="2">PremiumEconomy</option>
                                  <option value="3">Business</option>
                                  <option value="5">First</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          </label>
                          <div class="introGB">
                            <p class="introGBTag">New! group booking feature <span class="introGBInfo"><i class="fa fa-info-circle" aria-hidden="true"></i></span> </p>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-md-12">
                      <div class="group-btn-flight">
					   <button type="submit" name="searchFlight" class="btn btn-primary"><i class="fas fa-search"></i>Search </button> </div>
                    </div>
                  </div>
                </div>
              </div>
               </form>
            </div>
		 	
			
            <div class="tab-pane fade" id="pills-hotel" role="tabpane1" aria-labelledby="pills-hotel-tab">
			 <form action="https://ridhitravels.in/web/travel/searchHotelResult.php" method="get">
              <div class="base-find-hotel">
                <div class="find-hotel-form">
                  <div class="widgetSection">
                    <div class="inner-box">
                      <div class="searchCity hover-bg"> <span class="latoBold ">City</span>
                        <div class="input-group input55">
                          <select class="form-control" id="country3" name="txtDestination" required>
                            <option selected="selected" value="">&nbsp;Select&nbsp;City or Hotel Name&nbsp;&nbsp;&nbsp;</option>
                            <?php while($cityName=mysqli_fetch_array($allHotelName)){?>
								<option value="<?php echo $cityName['cityid']?>"><?php 
								echo $cityName['hotelName'];
								if(!empty($cityName['stateprovince'])) echo ", ".$cityName['stateprovince'];
								if(!empty($cityName['countrycode'])){echo ", ".$cityName['countrycode'];}?></option>
							<?php }?>
                          </select>
                        </div>
                      </div>
                      <div class="searchCity d-flex">
                        <div class="dates hover-bg">
                          <label for="Chack in">
                          <span class="latoBold">Check In <i class="fa fa-chevron-down" aria-hidden="true"></i></span>
                          <div class="input-group">
                            <div class="t-datepicker">
                              <div class="t-check-in"></div>
                            </div>
                          </div>
                          </label>
                        </div>
                        <div class="dates hover-bg" style="border: 0;">
                          <label for="Chack in">
                          <span class="latoBold">Check Out <i class="fa fa-chevron-down" aria-hidden="true"></i></span>
                          <div class="input-group">
                            <div class="t-datepicker">
                              <div class="t-check-out"></div>
                            </div>
                          </div>
                          </label>
                        </div>
                      </div>
                      <div data-cy="" class="searchCity hover-bg"> <span class="latoBold">Rooms & Guests</span>
                        <div class="d-flex-22">
                          <div class="bb-11">
                            <label><i class="fa fa-bed" aria-hidden="true"></i></label>
							<input type="hidden" id="NoOfNights" name="NoOfNights" class="form-control" value="1" min="1" max="31" required autocompleted="off">
							<input type="hidden" id="Nationality" name="Nationality" class="form-control" value="IN" required autocompleted="off">
                            
							<select id="NoOfRooms" class="form-control hasDatepicker" name="NoOfRooms" tabindex="9" required>
                              <option selected="selected" value="1">Rooms</option>
                              <option value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                            </select>
                          </div>
                          <div class="bb-11">
                            <label><i class="fa fa-users" aria-hidden="true"></i></label>
                            <select class="form-control hasDatepicker" name="NoOfAdult1" tabindex="8" required>
                              <option selected="selected" value="0">Adult+</option>
                              <option  value="1">1</option>
                              <option value="2">2</option>
                              <option value="3">3</option>
                              <option value="4">4</option>
                              <option value="5">5</option>
                              <option value="6">6</option>
                              <option value="7">7</option>
                              <option value="8">8</option>
                            </select>
                          </div>
                        </div>
                        <div class="d-flex-22">
                          <div class="bb-11">
                            <label><i class="fa fa-child" aria-hidden="true"></i> (0-12 Years)</label>
                          </div>
                          <div class="bb-11">
                            <select class="form-control hasDatepicker" id="NoOfChilds1" name="NoOfChilds1" tabindex="8" onClick="fillChildAge(this.value)" required>
                              <option selected="selected" value="0">Children</option>
                              <option value="0">0</option>
                              <option value="1">1</option>
                            </select>
                            <script>
                                function fillChildAge(GetNoChild){
                                if(GetNoChild==1){
                                    document.getElementById('Room1childAge1').value=3;
                                    //document.getElementById('Room1').value=1;
                                 }    
                                 else{
                                 document.getElementById('Room1childAge1').value='';
                                 //document.getElementById('Room1').value='';
                                  }
                                }
                            </script>
                            <input type="hidden" name="Room1childAge1" id="Room1childAge1">
                            
                          </div>
                        </div>
                      </div>
                 <div class="searchCity hover-bg"> <span class="latoBold ">Travelling for <i class="fa fa-chevron-down" aria-hidden="true"></i></span>
                        <div class="d-flex-22">
                          <div class="bb-11">
                            <label>Optional</label>
                          </div>
                          <div class="bb-11">
                            <select class="form-control hasDatepicker"  name="travellingFor" tabindex="8">
                              <option selected="selected" value="">Work</option>
                              <option  value="0">Liesure</option>
                            </select>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12">
                    <div class="group-btn-flight"> 
					<button type="submit" name="searchHotel" class="btn btn-primary"><i class="fas fa-search"></i>Search now </button> </div>
                  </div>
                </div>
              </div>
			 </form> 
            </div>
          </div>
          
        </div>
      </div>
    </div>
  </div>
</div>
<!-- End Tab Search Section -->
<style>
    /*********************************************************
	6. HOMEPAGE SEARCH 
**********************************************************/
    
    .home-title {
        margin-top: 60px;
        color: #fff;
    }
    
    .col11 {
        text-align: center;
        margin: 0 5px;
        color: white;
        text-decoration: none;
        font-size: 20px;
        width: 33.33%;
    }
    
    .menucol {
        text-align: center;
        margin: 0 5px;
        color: white;
        text-decoration: none;
        font-size: 20px;
        width: 33.33%;
    }
    
    .home-title h1 {
        margin-top: 0px;
        font-weight: 800;
        font-size: 50px;
        letter-spacing: 2px;
    }
    
    .home-title h2 {
        margin-bottom: 0px;
    }
    
    .search-section {
        margin-top: 30px;
        margin-bottom: 0px;
    }
    
    .search-section .nav-tabs {
        border-bottom: none;
    }
    
    .search-section .nav-tabs .active {
        position: relative;
    }
    
    .search-section .nav-tabs .active:after {
        background: #f9676b none repeat scroll 0 0;
        content: "";
        height: 12px;
        /* left: 40%; */
        position: absolute;
        top: 75%;
        transform: rotate(45deg);
        -webkit-transform: rotate(45deg);
        -ms-transform: rotate(45deg);
        -moz-transform: rotate(45deg);
        -o-transform: rotate(45deg);
        width: 20px;
    }
    
    .search-section .nav-tabs>li>a {
        color: #ffffff;
        background: rgba(10, 49, 82, 0.5);
        letter-spacing: 1px;
        font-weight: bold;
        border-radius: 2px 2px 0 0;
        margin-right: 4px;
    }
    
    .search-section .nav>li>a {
        padding: 5px;
    }
    
    .search-section .nav-tabs>li {
        margin-bottom: 0px;
    }
    
    .search-section .nav-tabs>li>a:hover {
        color: #ffffff;
        background: #f9676b;
        border: 1px solid transparent;
    }
    
    .search-section .nav-tabs>li.active>a,
    .search-section .nav-tabs>li.active>a:focus,
    .search-section .nav-tabs>li.active>a:hover {
        color: #ffffff;
        background: #f9676b;
        border: 1px solid transparent;
    }
    
    .search-section .tab-content {
        color: #07253F;
        background: #fff;
        padding: 16px 0px;
    }
    
    .search-section label {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .search-section .form-control {
        background-color: transparent;
        border: 1px solid #BEC4C8;
        border-radius: 0;
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
        color: #07253F;
        display: block;
        font-size: 15px;
        height: 40px;
        line-height: 1.42857;
        padding: 6px 12px;
        transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
        width: 100%;
        z-index: 0;
    }
    
    .search-section .form-control::-moz-placeholder {
        color: #989DA0;
        opacity: 1;
    }
    
    .search-section .form-control:-ms-input-placeholder {
        color: #BEC4C8;
    }
    
    .search-section .form-control::-webkit-input-placeholder {
        color: #BEC4C8;
    }
    
    .search-section .form-control::-o-input-placeholder {
        color: #BEC4C8;
    }
    
    .search-section .input-group-addon {
        background: transparent;
        color: #BEC4C8;
        border-top: 1px solid #BEC4C8;
        border-right: 1px solid #BEC4C8;
        border-bottom: 1px solid #BEC4C8;
        border-radius: 0;
    }
    
    .search-section .product-search-title {
        font-size: 18px;
        display: block;
        font-weight: 800;
        text-transform: uppercase;
        color: #f9676b;
    }
    
    .search-section .search-col-padding {
        padding-top: 15px;
    }
    
    .search-section option {
        color: #07253F;
    }
    
    #ui-datepicker-div {
        background: #07253F;
        z-index: 9999 !important;
    }
    
    #ui-datepicker-div table {
        margin: 0px;
    }
    
    .ui-datepicker-calendar a {
        padding: 5px;
        color: #ffffff;
    }
    
    .ui-datepicker-calendar a:hover {
        color: #00ADEF;
    }
    
    .ui-datepicker-calendar td {
        padding: 5px 5px;
    }
    
    .ui-datepicker-calendar .ui-state-disabled {
        color: #0A3152;
    }
    
    .ui-datepicker-calendar th {
        color: #ffffff;
        padding: 7px;
    }
    
    .ui-datepicker-header {
        margin: 10px;
    }
    
    .ui-datepicker-header .ui-datepicker-title {
        color: #ffffff;
        text-align: center;
    }
    
    .ui-datepicker-header a {
        color: #ffffff;
        cursor: pointer;
    }
    
    .ui-datepicker-header a:hover {
        color: #00ADEF;
    }
    
    .ui-spinner-up i {
        color: #BEC4C8;
        float: right;
        margin-top: -27px;
        margin-right: 10px;
        z-index: 99999;
    }
    
    .ui-spinner-down i {
        color: #BEC4C8;
        float: left;
        margin-top: -27px;
        margin-left: 10px;
        z-index: 99999;
    }
    
    .quantity-padding {
        padding-left: 40px !important;
    }
    
    .ui-datepicker-prev {
        float: left;
    }
    
    .ui-datepicker-next {
        float: right;
    }
    
    .custom-select-button {
        background: transparent none repeat scroll 0 0;
        border: 1px solid #BEC4C8;
        border-radius: 0;
        height: 40px;
    }
    
    .bootstrap-select.btn-group .dropdown-menu {
        background: #07253F;
        border-radius: 0;
    }
    
    .bootstrap-select.btn-group .dropdown-menu li a {
        color: #ffffff;
        background: #07253F !important;
    }
    
    .bootstrap-select.btn-group .dropdown-menu li a:hover {
        color: #00ADEF;
    }
    
    .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
        width: 100%;
    }
    

    
    .search-button {
        background: #f9676b;
        border-radius: 0;
        margin-top: 10px;
        padding: 6px 10px;
        font-size: 15px;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: bold;
        color: #fff;
        transition: all 0.3s ease;
        -ms-transition: all 0.3s ease;
        -moz-transition: all 0.3s ease;
        -webkit-transition: all 0.3s ease;
        -o-transition: all 0.3s ease;
    }
    
    .search-button:hover {
        background: #00adef;
        color: #fff;
    }
    
    .owl-theme .owl-dots .owl-dot.active span,
    .owl-theme .owl-dots .owl-dot:hover span {
        background: #f9676b !important;
    }
    
    .offer-slider {
        margin-top: 200px;
    }
    
    .offer-slider .item {
        color: #fff;
    }
    
    .offer-slider .item h4,
    .offer-slider .item h3 {
        font-weight: bold;
        margin: 0px 0px 15px;
    }
    
    .offer-slider .item a {
        display: inline-block;
        color: #fff;
        border: 2px solid #fff;
        padding: 5px 15px;
        font-weight: bold;
    }
    
    .offer-slider .item a:hover {
        color: #fff;
        background: #f9676b;
        border: 2px solid transparent;
    }
    
    .offer-slider .owl-theme .owl-dots .owl-dot span {
        background: #fff;
        margin-top: 15px;
    }
    
    .offer-slider .owl-theme .owl-dots {
        text-align: right;
    }
    
    .bg-slider .carousel-caption {
        color: #fff;
        text-shadow: none;
        top: 30%;
        z-index: 0;
    }
    
    .bg-slider .carousel-caption h2 {
        font-weight: 800;
        font-size: 50px;
        letter-spacing: 2px;
    }
    
    .bg-slider .carousel-caption h4 {
        font-weight: 700;
    }
    
    .bg-slider .carousel-caption h4 span {
        font-weight: 900;
    }
    
    .bg-slider .carousel-caption a {
        border: 2px solid #fff;
        color: #fff;
        display: inline-block;
        font-weight: 700;
        margin-top: 15px;
        padding: 8px 20px;
    }
    
    .bg-slider .carousel-caption a:hover {
        color: #fff;
        background: #f9676b;
        border: 2px solid transparent;
    }
    
    .bg-slider .carousel-indicators {
        display: none;
    }
    
    .bottom-search {
        padding: 0 0 60px;
        background: #f7f7f7;
    }
    
    .bottom-search .search-section {
        margin: -53px 0 0;
    }
    
    .bottom-search .tab-content {
        box-shadow: 0px 0px 5px #e6e6e6;
    }
    
    .vertical-tab {
        padding-right: 0px;
        margin-top: 30px;
    }
    
    .vertical-tab .nav-tabs>li {
        display: block;
        width: 100%;
    }
    
    .vertical-tab .nav-tabs .active::after {
        display: none;
    }
    
    .vertical-tab-pannel {
        padding-left: 0px;
    }
    
    .vertical-tab-pannel .tab-content {
        box-shadow: 0px 0px 5px #e6e6e6;
    }
    
    .vertical-tab .nav-tabs>li>a {
        background: #f7f7f7;
        color: #BEC4C8;
        margin: 0px;
        border-radius: 0;
        border-bottom: 1px solid #e6e6e6;
    }
    
    .vertical-tab .nav-tabs>li>a i {
        margin-right: 5px;
    }
    
    .vertical-tab .nav-tabs>li.active>a,
    .vertical-tab .nav-tabs>li.active>a:focus,
    .vertical-tab .nav-tabs>li.active>a:hover {
        background: #fff none repeat scroll 0 0;
        color: #07253F;
        z-index: 2;
        border-bottom: 1px solid #e6e6e6;
    }
    
    .offer-box {
        color: #07253F;
        text-align: center;
    }
    
    .offer-box img {
        max-width: 100%;
        padding: 5px;
        border: 1px solid #e6e6e6;
    }
    
    .offer-box .item h4 {
        font-weight: bold;
    }
    
    .offer-box a {
        background: #f9676b none repeat scroll 0 0;
        color: #fff;
        display: inline-block;
        font-size: 12px;
        font-weight: bold;
        margin: 5px 0;
        padding: 8px 10px;
    }
    
    .offer-box a:hover {
        background: #00adef;
    }
    
    .vertical-search,
    .full-width-search {
        padding: 0px 0px;
    }
    
    .tran-search-box .tab-content {
        background: rgba(10, 49, 82, 0.5);
        color: #fff;
    }
    
    .tran-search-box .tab-content .form-control,
    .tran-search-box .input-group-addon,
    .tran-search-box .custom-select-button {
        color: #07253F;
        background: #fff;
    }
    
    .tran-search-box .nav-tabs {
        border-bottom: 4px solid #f9676b;
    }
    
    @media (max-width: 991px) {
        .offer-slider,
        .offer-box {
            display: none;
        }
    }
    
    @media (max-width:767px) {
        .vertical-tab .nav-tabs>li {
            display: block;
            width: auto;
        }
        .vertical-tab-pannel {
            padding-left: 15px;
        }
        .vertical-tab {
            padding-right: 15px;
            margin-top: 0px;
        }
        .search-top span {
            /* display: none; */
        }
        .nav>li>a {
            padding: 8px;
        }
        .home-title h1 {
            font-size: 24px;
        }
        .home-title h2 {
            margin-bottom: 0px;
            font-size: 20px;
        }
        .bg-slider .carousel-caption h2 {
            font-size: 20px;
        }
        .bg-slider .carousel-caption h4,
        .bg-slider .carousel-caption a {
            display: none;
        }
        .bg-slider .carousel-caption {
            top: 5%;
        }
    }
</style>
<link href="./css/flexslider.css" rel="stylesheet" media="screen">
<!-- START: FOOTER -->
</div>
<!-- END: SITE-WRAPPER -->
<!-- Load Scripts -->
<script>
    function shRtrip(tripType) {
        if (tripType == 'roundway') {
            document.getElementById('roundTrip').style.display = 'block';
            document.getElementById('return_date').value = '';

        } else {
            document.getElementById('roundTrip').style.display = 'none';
        }
    }
</script>
<link href="css/t-datepicker-blue.css" rel="stylesheet">
<link href="css/t-datepicker.min.css" rel="stylesheet">
<!---Ajax to search anything------->
<script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" />
<link href="https://ridhitravels.in/web/travel/assets/css/search-multiple.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script>
<script src="./js/t-datepicker.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        var country1 = [];
        $("#country1").select2({
            data: country1
        });
    });
    $(document).ready(function() {
        var country2 = [];
        $("#country2").select2({
            data: country2
        });
    });
    $(document).ready(function() {
        var country3 = [];
        $("#country3").select2({
            data: country3
        });
    });
</script>
<script>
    $(document).ready(function() {
        // Call global the function
        $('.t-datepicker').tDatePicker({
            // options here
        });
    });
</script>
