Reservation
Home » Reservation
Filling out the form is very easy! Just fill in your exact arrival date by choosing the day and the month from the pull-down menu. Then select how many nights you will stay and finally click submit.
If you need any help or have any questions, you can contact us and we will be glad to help you.
$(function() {
$('#quickbooking #arrival').datepicker({
dateFormat: 'dd, M yy',
beforeShowDay: function(date) {
var currentDate = new Date();
currentDate.setHours(0);
currentDate.setMinutes(0);
currentDate.setSeconds(0);
currentDate.setMilliseconds(0);
if (date >= currentDate) {
return [true, ''];
}
else {
return [false, ''];
}
},
onSelect: function(dateText, inst) {
var nextDay = $('#quickbooking #arrival').datepicker('getDate');
nextDay.setDate(nextDay.getDate() + 1);
var depart = $('#quickbooking #departure').datepicker('getDate');
if (depart < nextDay) { $('#quickbooking #departure').val($.datepicker.formatDate('dd, M yy', nextDay)); } } }).val($.datepicker.formatDate('dd, M yy', new Date())); var nextDay = new Date(); nextDay.setDate(new Date().getDate() + 1); $('#quickbooking #departure').datepicker({ dateFormat: 'dd, M yy', beforeShowDay: function(date) { var nextDay = $('#quickbooking #arrival').datepicker('getDate'); nextDay.setDate(nextDay.getDate() + 1); nextDay.setHours(0); nextDay.setMinutes(0); nextDay.setSeconds(0); nextDay.setMilliseconds(0); if (date >= nextDay) {
return [true, ''];
}
else {
return [false, ''];
}
}
}).val($.datepicker.formatDate('dd, M yy', nextDay));
$('#quickbooking form').submit(function(e) {
e.preventDefault();
var $this = $(this);
var url = '';
var values = {};
$.each($this.serializeArray(), function(k, v) {
values[v.name] = v.value;
});
if (values.hotel == -1) {
url = '';
}
else {
url = 'https://tatakihotel.book-onlinenow.net/index.aspx?';
}
delete values.hotel;
var arrivalDate = $('#arrival', $this).datepicker('getDate');
var departureDate = $('#departure', $this).datepicker('getDate');
values.arrival = $.datepicker.formatDate('dd/mm/yy', arrivalDate);
values.departure = $.datepicker.formatDate('dd/mm/yy', departureDate);
$.each(values, function(k, v) {
if (v.length > 0) {
url += k + '=' + v + '&';
}
});
url = url.substr(0, url.length-1);
//uncomment below if results in _self
//window.location.href = url;
//comment below if you need result in _self
var BookSearch = window.open(url, "_blank");
});
});