<main>
<img src="https://upload.wikimedia.org/wikipedia/en/thumb/f/fe/Garuda_Indonesia_Logo.svg/1280px-Garuda_Indonesia_Logo.svg.png" width="300">
<h3><span class="fontawesome-plane">
<h2>Pilih jadwal penerbangan anda dibawah ini</h2>
<div class="input-daterange input-group" id="flight-datepicker">
<div class="form-item">
<label>Keberangkatan</label><span class="fontawesome-calendar"></span>
<input class="input-sm form-control" type="text" id="start-date" name="start" placeholder="Pilih tanggal pulang" data-date-format="DD, MM d"/><span class="date-text date-depart"></span>
</div>
<div class="form-item">
<label>Pulang</label><span class="fontawesome-calendar"></span>
<input class="input-sm form-control" type="text" id="end-date" name="end" placeholder="Pilih tanggal pulang" data-date-format="DD, MM d"/><span class="date-text date-return"></span>
</div>
</div>
</main>
@import url(https://fonts.googleapis.com/css?family=Lato:900,300);
@import url(http://weloveiconfonts.com/api/?family=fontawesome);
* {
box-sizing: border-box;
}
body {
font-family: "Lato", sans-serif;
line-height: 1.2;
background: #36D1DC;
background: -webkit-linear-gradient(to right, #5B86E5, #36D1DC);
background: linear-gradient(to right, #5B86E5, #36D1DC);
}
h1 {
font-size: 40px;
font-weight: 900;
color: #ffffff;
margin-bottom: 12px;
}
h2 {
font-size: 22px;
color: #ffffff;
margin-bottom: 12px;
}
h3 {
font-size: 15px;
color: #ffffff;
margin-bottom: 12px;
}
main {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
padding: 24px;
width: 100%;
height: 100%;
max-width: 600px;
}
#flight-datepicker {
margin-top: 36px;
}
@media screen and (min-width: 400px) {
#flight-datepicker {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
}
#flight-datepicker .form-item {
position: relative;
margin: 12px 0 60px;
}
@media screen and (min-width: 400px) {
#flight-datepicker .form-item {
margin: 12px 24px 0 0;
}
}
#flight-datepicker label {
display: block;
margin-bottom: 8px;
color: white;
}
#flight-datepicker input {
display: block;
margin-bottom: 8px;
padding-bottom: 6px;
width: 100%;
font-family: "Lato", sans-serif;
font-size: 22px;
font-weight: bold;
text-align: left;
color: #0e3e43;
background-color: transparent;
border: none;
border-bottom: 2px solid #ffffff;
border-radius: 0;
outline: none;
-webkit-transition: border-color .2s ease-out;
transition: border-color .2s ease-out;
}
#flight-datepicker input:first-child, #flight-datepicker input:last-child {
border-radius: 0;
}
#flight-datepicker input::-webkit-input-placeholder {
color: #0e3e43;
font-size: 14px;
line-height: 30px;
-webkit-transition: color .2s .2s ease-out;
transition: color .2s .2s ease-out;
}
#flight-datepicker input:-moz-placeholder {
color: #0e3e43;
font-size: 14px;
line-height: 30px;
-webkit-transition: color .2s .2s ease-out;
transition: color .2s .2s ease-out;
}
#flight-datepicker input::-moz-placeholder {
color: #0e3e43;
font-size: 14px;
line-height: 30px;
-webkit-transition: color .2s .2s ease-out;
transition: color .2s .2s ease-out;
}
#flight-datepicker input:-ms-input-placeholder {
color: #0e3e43;
font-size: 14px;
line-height: 30px;
-webkit-transition: color .2s .2s ease-out;
transition: color .2s .2s ease-out;
}
#flight-datepicker input:focus {
border-bottom-color: #125259;
}
#flight-datepicker input:focus::-webkit-input-placeholder {
color: transparent;
-webkit-transition: color .2s ease-out;
transition: color .2s ease-out;
}
#flight-datepicker input:focus:-moz-placeholder {
color: transparent;
-webkit-transition: color .2s ease-out;
transition: color .2s ease-out;
}
#flight-datepicker input:focus::-moz-placeholder {
color: transparent;
-webkit-transition: color .2s ease-out;
transition: color .2s ease-out;
}
#flight-datepicker input:focus:-ms-input-placeholder {
color: transparent;
-webkit-transition: color .2s ease-out;
transition: color .2s ease-out;
}
#flight-datepicker .date-text {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
top: calc(100% + 6px);
font-size: 12px;
color: white;
}
@media screen and (min-width: 400px) {
#flight-datepicker .date-text {
top: 100%;
}
}
.datepicker.dropdown-menu {
padding: 0;
background-clip: border-box;
border: none;
border-radius: 0;
-webkit-animation: popup .2s ease-out forwards;
animation: popup .2s ease-out forwards;
}
.datepicker.dropdown-menu table {
background-color: #1b7983;
}
.datepicker.dropdown-menu table thead {
background-color: #1b7983;
}
.datepicker.dropdown-menu table thead tr {
border-top: 0;
}
.datepicker.dropdown-menu table tbody {
background-color: white;
}
.datepicker.dropdown-menu table tr {
border-top: 1px solid #ededed;
}
.datepicker.dropdown-menu table tr td, .datepicker.dropdown-menu table tr th {
width: auto;
height: 24px;
padding: 8px;
font-size: 16px;
border-radius: 0;
-webkit-transition: background-color .6s ease-out;
transition: background-color .6s ease-out;
}
@media screen and (min-width: 400px) {
.datepicker.dropdown-menu table tr td, .datepicker.dropdown-menu table tr th {
padding: 12px;
}
}
.datepicker.dropdown-menu table tr td:hover, .datepicker.dropdown-menu table tr td.active:hover, .datepicker.dropdown-menu table tr td:active:hover, .datepicker.dropdown-menu table tr th:hover, .datepicker.dropdown-menu table tr th.active:hover, .datepicker.dropdown-menu table tr th:active:hover {
border-color: #ededed;
border-radius: 0;
-webkit-transition: background-color .2s ease-out;
transition: background-color .2s ease-out;
}
.datepicker.dropdown-menu table tr td.focused, .datepicker.dropdown-menu table tr td.selected, .datepicker.dropdown-menu table tr th.focused, .datepicker.dropdown-menu table tr th.selected {
background-color: #24A0AD;
border-color: #ededed;
border-radius: 0;
}
.datepicker.dropdown-menu table tr td.active, .datepicker.dropdown-menu table tr td.active:focus, .datepicker.dropdown-menu table tr td.active.active:hover, .datepicker.dropdown-menu table tr td:active:focus, .datepicker.dropdown-menu table tr td.highlighted, .datepicker.dropdown-menu table tr th.active, .datepicker.dropdown-menu table tr th.active:focus, .datepicker.dropdown-menu table tr th.active.active:hover, .datepicker.dropdown-menu table tr th:active:focus, .datepicker.dropdown-menu table tr th.highlighted {
background-color: #1b7983;
border-color: #ededed;
}
.datepicker.dropdown-menu table tr th.datepicker-switch {
font-size: 12px;
font-weight: bold;
line-height: 2;
text-transform: uppercase;
letter-spacing: .05em;
color: #ffffff;
background-color: inherit;
border-radius: 0;
}
.datepicker.dropdown-menu table tr th.prev,
.datepicker.dropdown-menu table tr th.next {
color: #ffffff;
background-color: #17656e;
border-radius: 0;
}
.datepicker.dropdown-menu table tr th.dow {
padding: 2px 12px;
font-size: 12px;
line-height: 2;
color: #ffffff;
background-color: #19717a;
border-top: 1px solid #196d76;
border-radius: 0;
}
.datepicker.dropdown-menu table tr td.day {
width: 24px;
border-right: 1px solid #ededed;
}
.datepicker.dropdown-menu table tr td.day:last-child {
border-right-width: 0;
}
.datepicker.dropdown-menu table tr td.range {
background-color: #eeeeee;
}
.datepicker.dropdown-menu .new,
.datepicker.dropdown-menu .old,
.datepicker.dropdown-menu .disabled,
.datepicker.dropdown-menu .disabled:hover {
color: #ccc;
}
[class*="fontawesome-"]:before {
font-family: 'FontAwesome', sans-serif;
}
.fontawesome-calendar {
position: absolute;
top: 26px;
right: 0;
font-size: 24px;
z-index: -99;
}
@-webkit-keyframes popup {
from {
opacity: 0;
-webkit-transform: translateY(12px);
transform: translateY(12px);
}
to {
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@keyframes popup {
from {
opacity: 0;
-webkit-transform: translateY(12px);
transform: translateY(12px);
}
to {
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
var dateSelect = $('#flight-datepicker');
var dateDepart = $('#start-date');
var dateReturn = $('#end-date');
var spanDepart = $('.date-depart');
var spanReturn = $('.date-return');
var spanDateFormat = 'ddd, MMMM D yyyy';
dateSelect.datepicker({
autoclose: true,
format: "mm/dd",
maxViewMode: 0,
startDate: "now"
}).on('change', function() {
var start = $.format.date(dateDepart.datepicker('getDate'), spanDateFormat);
var end = $.format.date(dateReturn.datepicker('getDate'), spanDateFormat);
spanDepart.text(start);
spanReturn.text(end);
});