forked from microsoft/ContosoAir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
front.js
27 lines (20 loc) · 854 Bytes
/
front.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var $ = require('jquery');
require('bootstrap-datepicker');
require('bootstrap-datepicker/dist/css/bootstrap-datepicker3.standalone.css');
require('./scss/main.scss');
$(document).ready(function(){
var today = $('.datepicker').data('start') || new Date();
var options = {
format: 'yyyy-mm-dd',
startDate: today
};
$('.datepicker').datepicker(options);
$('#dpa').on('changeDate', function(e) {
var datepicker = $('#dpb').data("datepicker");
datepicker.setStartDate(e.date);
});
$('.block-flights-results input[type="radio"]').change(function(){
$(this).closest('.block-flights-results').find('.big-blue-radio').removeClass('big-blue-radio--active');
$(this).closest('.block-flights-results-list-item').find('.big-blue-radio').addClass('big-blue-radio--active');
})
})