protected function set_end_date_time() { $this->vars['endMinuteOptions'] = Tribe__View_Helpers::getMinuteOptions($this->vars['_EventEndDate']); $this->vars['endHourOptions'] = Tribe__View_Helpers::getHourOptions($this->vars['_EventAllDay'] == 'yes' ? null : $this->vars['_EventEndDate']); $this->vars['endMeridianOptions'] = Tribe__View_Helpers::getMeridianOptions($this->vars['_EventEndDate']); $datepicker_format = Tribe__Date_Utils::datepicker_formats(tribe_get_option('datepickerFormat')); if ($this->vars['_EventEndDate']) { $end = Tribe__Date_Utils::date_only($this->vars['_EventEndDate'], false, $datepicker_format); } // If we don't have a valid end date, assume today's date $this->vars['EventEndDate'] = isset($end) && $end ? $end : date($datepicker_format); }
/** * Generates and returns a set of classes for the current day. * * @return string */ public static function day_classes() { $current_day = self::get_current_day(); $calendar_day = Tribe__Date_Utils::date_only($current_day['date']); $today = date_i18n(Tribe__Date_Utils::DBDATEFORMAT); // Start by determining which month we're looking at if ($current_day['month'] == self::CURRENT_MONTH) { $classes = 'tribe-events-thismonth'; } else { $classes = 'tribe-events-othermonth'; } // Check if the calendar day is in the past, present, or future if ($calendar_day < $today) { $classes .= ' tribe-events-past'; } elseif ($calendar_day === $today) { $classes .= ' tribe-events-present'; } elseif ($calendar_day > $today) { $classes .= ' tribe-events-future'; } // The day has some events if ($current_day['total_events'] > 0) { $classes .= ' tribe-events-has-events'; } // Needed for mobile js $daynum = date('d', strtotime($calendar_day)); $classes .= ' mobile-trigger tribe-event-day-' . $daynum; // Determine which column of the grid the day is in $column = self::$current_day - self::$current_week * 7; if ($column > 0 && ($column % 4 == 0 || $column % 5 == 0 || $column % 6 == 0)) { $classes .= ' tribe-events-right'; } return $classes; }
</option> <option value="Yearly" data-plural="<?php esc_attr_e('Year(s) on:', 'tribe-events-calendar-pro'); ?> " data-rule-segment=".custom-recurrence-years"><?php esc_html_e('Yearly', 'tribe-events-calendar-pro'); ?> </option> {{/tribe_recurrence_select}} </select> <span class="recurrence-end"> <?php esc_html_e('will not occur on', 'tribe-events-calendar-pro'); ?> <input autocomplete="off" placeholder="<?php echo esc_attr(Tribe__Date_Utils::date_only(date(Tribe__Date_Utils::DBDATEFORMAT))); ?> " type="text" class="tribe-datepicker custom-date" name="recurrence[exclusions][][custom][date][date]" data-field="custom-date" value="{{custom.date.date}}"/> </span> <span class="recurrence-row custom-recurrence-frequency"> <?php esc_html_e('will not occur every', 'tribe-events-calendar-pro'); ?> <input type="text" name="recurrence[exclusions][][custom][interval]" data-field="custom-interval" value="{{#if custom.interval}}{{custom.interval}}{{else}}1{{/if}}" /> <span class="recurrence-interval-type"></span> <input type="hidden" name="recurrence[exclusions][][custom][type-text]" data-field="custom-type-text" value="{{custom.[type-text]}}" /> <input type="hidden" name="recurrence[exclusions][][occurrence-count-text]" data-field="occurrence-count-text" value="<?php esc_attr_e(_x('events', 'occurence count text', 'tribe-events-calendar-pro')); ?> " /> <span class="rec-error rec-days-error"><?php