// Concatenation / Join of two string using Smarty using '|cat:' keyword.
{$param_key = "param_"|cat:$item_name.id}
{$param_key = "param_"|cat:$item_name.id}
/** Auto closing of In/Out POPUP on Select */ var enableInOutDatePicker = function (date1, date2) { // $( "#start_date" ).datepicker( { startDate:null, format:'dd/mm/yyyy', todayHighlight:true } ); if ( (date1 =="" ) || (date1 == undefined) ) { var date1 = 'start_date'; } if ( (date2 =="" ) || (date2 == undefined) ) { var date1 = 'end_date'; } var nowTemp = new Date(); var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0); //alert(nowTemp); var checkin = $('#' + date1).datepicker({ beforeShowDay: function (date) { return date.valueOf() >= now.valueOf(); } }).on('changeDate', function (ev) { if (ev.date.valueOf() > checkout.date.valueOf()) { var newDate = new Date(ev.date); newDate.setDate(newDate.getDate() + 7); //alert(newDate); checkout.setValue(newDate); //checkout.setDate(newDate); checkout.update(); } checkin.hide(); $('#' + date2).focus(); }).data('datepicker'); var checkout = $('#' + date2).datepicker({ beforeShowDay: function (date) { return date.valueOf() > checkin.date.valueOf(); } }).on('changeDate', function (ev) { checkout.hide(); }).data('datepicker'); }; /** Auto closing of In/Out POPUP on Select */
/** Auto closing of POPUP on single date Selection */ var enableSingleDatePicker = function (date) { if ( (date =="" ) || (date == undefined) ) { var date = 'start_date'; } var nowTemp = new Date(); var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0); var checkout = $('#' + date).datepicker({ beforeShowDay: function (date) { return date.valueOf() >= now.valueOf(); } }).on('changeDate', function (ev) { checkout.hide(); }).data('datepicker'); };