I want to show only specific time on calender
I had given following in timeslot settings.
Hours:3

Minutes:0

Maximum avaliable slots per timeframe:1

Hour from:8
Hour to:17

Now on day view of calender , i want to show time as:
08:00 : book now (skipping 3 hrs)
11:00 : book now
14:00: book now

i do not want to show default hour time slot :
08:00 : book now
09:00 : book now
10:00: book now
11:00 book now
12:00 book now
13:00 book now
14:00 book now
15:00 book now
16:00 book now
17:00 book now
How can it be done. I am trying to modify calander-day.tpl.php, but not getting suceess. Please help me out.

Comments

Priyanka Singh’s picture

Finally find a solution as per my requirement.

Chnage the following code in calander-day.tpl.php

        foreach ($bt_day_times as $hh => $avail_slots) {

            $hour = array_key_exists($hh, $rows['items']) ? $rows['items'][$hh] : array('hour' => substr($hh, 0, strlen($hh)-3), 'ampm' => ''); // prepare hour time slot
			$content = '';
    

Changed code:

//print_r($bt_day_times);
unset($bt_day_times['09:00:00']);
unset($bt_day_times['10:00:00']);
unset($bt_day_times['12:00:00']);
unset($bt_day_times['13:00:00']);
unset($bt_day_times['15:00:00']);
unset($bt_day_times['16:00:00']);


        foreach ($bt_day_times as $hh => $avail_slots) {

            $hour = array_key_exists($hh, $rows['items']) ? $rows['items'][$hh] : array('hour' => substr($hh, 0, strlen($hh)-3), 'ampm' => ''); // prepare hour time slot
			$content = '';
    
kenorb’s picture

Issue summary: View changes
Status: Active » Fixed

This is something that works in Drupal 7.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.