<% if( this.hourslist ) {
// For each hour
var cal_d = this.day.addDays( 1 - (this.day.getDay() == 0 ? 7 : this.day.getDay()) );
for(var cal_ii = 0; cal_ii < this.hourslist.length; cal_ii++) {
var thour = trim(fbobjectdata(this.hourslist[cal_ii]));
%>
<% // For each week day
for( var cal_iday = 0; cal_iday < 7; cal_iday++ ) {
var tindex = this.quickdatalist.indexOf(cal_d.addDays(cal_iday).formatSql() + ' ' + thour);
var toccupied = tindex >= 0;
var teventtext = tindex >= 0 ? this.quickdatalistdisplay[tindex] : 'DISPONIBLE';
if( this.enablefrom && this.enablefrom != '' ) {
if( cal_d.addDays(cal_iday).formatSql() < parseDate(this.enablefrom).formatSql() ) {
toccupied = true;
teventtext = 'NO DISPONIBLE';
}
}
if( this.enableto && this.enableto != '' ) {
if( cal_d.addDays(cal_iday).formatSql() > parseDate(this.enableto).formatSql() ) {
toccupied = true;
teventtext = 'NO DISPONIBLE';
}
}
if( tindex > 0 ) {
console.log("[hourrender] day ", cal_d.addDays(cal_iday).formatSql());
console.log("[hourrender] qdl " , this.quickdatalist[tindex]);
}
%>
<% } %>
<% } } %>