$(document).ready(function() {
$('#check_in_date' ).datepicker ({
dateFormat : 'dd/mm/yy',
minDate : '20/09/2024',
numberOfMonths : 2,
onClose : function ( selectedDate ) {
$('#check_out_date').datepicker ( 'option', 'minDate', selectedDate );
}
});
$('#check_out_date').datepicker ({
dateFormat : 'dd/mm/yy',
minDate : '20/09/2024',
numberOfMonths : 2,
onClose : function ( selectedDate ) {
$( '#check_in_date' ).datepicker ( 'option', 'maxDate', selectedDate );
}
});
$('#calendar').fullCalendar({
disableDragging: true,
height: 40,
eventClick: function(event, jsEvent, view) {
//alert( $(this).css('background-color'));
// Get the case number in the row
// pos X clicked on the row / total width of the row * 100 (to percent) / (percent of 7 days by week)
var caseNumber = Math.floor((Math.abs(jsEvent.offsetX + jsEvent.currentTarget.offsetLeft) / $(this).parent().parent().width() * 100) / (100 / 7));
// Get the table
var table = $(this).parent().parent().parent().parent().children();
$(table).each(function(){
// Get the thead
if($(this).is('thead')){
var tds = $(this).children().children();
var dateClicked = $(tds[caseNumber]).attr("data-date");
//alert(dateClicked);
}
});
},
header: {
left: 'prev,next',
center: 'title',
right: ''
},
events: [
]
});
/*form = dialog.find( "form" ).on( "submit", function( event ) {
alert("test");
});*/
});
var price_arr = JSON.parse('null');
var room_type_arr = JSON.parse('null');
var available = JSON.parse('null');
var room_type_html = "";
room_type_html += '
';
function select_all_room_type(val){
for(k=1;k<=7;k++) {
if (($("#allt_type"+k).length > 0)){
$("#allt_type"+k).val(val);
if(check_date(true)){
room_rate(k);
}
$('#allt_type_name').val($('#allt_type').find(':selected').text());
}
}
}
function room_select_html(i){
var room_select_html = "";
room_select_html += '';
return room_select_html;
}
var count = ;
setTimeout(
function() {
if( count == 0 ) {
$("#no_rate").css("display", "block");
}
}
, 1000);
/*
{
textColor: '#000000',
color: '#ff9f89',
title: 'HKD3500',
url: 'http://google.com/',
start: '2015-02-28'
},
*/