ruleName = JText::translate('VBO_CONDTEXT_RULE_STAYDATES'); $this->ruleDescr = JText::translate('VBO_CONDTEXT_RULE_STAYDATES_DESCR'); $this->ruleId = basename(__FILE__); } /** * Displays the rule parameters. * * @return void */ public function renderParams() { ?>
vbo_app->getCalendar($this->getParam('from_date', ''), $this->inputName('from_date'), $this->inputID('from_date'), $this->wdf, array('class'=>'', 'size'=>'10', 'maxlength'=>'19', 'todayBtn' => 'true')); ?>
vbo_app->getCalendar($this->getParam('to_date', ''), $this->inputName('to_date'), $this->inputID('to_date'), $this->wdf, array('class'=>'', 'size'=>'10', 'maxlength'=>'19', 'todayBtn' => 'true')); ?>
getParams() !== null) { // some date-picker calendars may need to have their default value populated when the document is ready ?> getPropVal('booking', 'checkin'); $checkout = $this->getPropVal('booking', 'checkout'); if (!$checkin || !$checkout) { return false; } $from_date = $this->getParam('from_date', ''); $from_ts = VikBooking::getDateTimestamp($from_date, 0, 0, 0); $to_ts = VikBooking::getDateTimestamp($this->getParam('to_date', $from_date), 23, 59, 59); // return true if check-in or check-out dates are inside the dates interval return ( $checkin >= $from_ts && $checkin <= $to_ts ) || ( $checkout >= $from_ts && $checkout <= $to_ts ); } }