sampoyigi To display only opening hours see how timeslot is generated in the localbox component and apply the logic in getTimePickerOptions or getTimeSlots methods in extensions/igniter/reservation/components/Booking.php
Yes. This is modified code. Thank you. Now it work
public function getTimePickerOptions()
{
$options = [];
$startTime = Carbon::createFromTime(00, 00, 00);
$startTime->addMinutes(30);
$endTime = Carbon::createFromTime(23, 59, 59);
$interval = new DateInterval("PT{$this->property('timePickerInterval')}M");
$dateTimes = new DatePeriod($startTime, $interval, $endTime);
foreach ($dateTimes as $dateTime) {
$options[$dateTime->format('H:i')] = Carbon::parse($dateTime)->isoFormat($this->timeFormat);
}
return $options;
}
public function getTimeSlots()
{
$result = [];
$selectedDate = Carbon::createFromFormat('Y-m-d H:i', input('date').' '.input('time'));
$selectedDate->addMinutes(30);
$interval = $this->property('timeSlotsInterval', $this->location->getReservationInterval());
$dateTimes = $this->manager->makeTimeSlots($selectedDate, $interval);
$query = Request::query();
foreach ($dateTimes as $date) {
$query['sdateTime'] = $date->format('Y-m-d H:i');
$result[] = (object)[
'rawTime' => $date->format('Y-m-d H:i'),
'time' => Carbon::parse($date)->isoFormat($this->timeFormat),
'fullyBooked' => $this->manager->isFullyBookedOn($date, input('guest')),
'actionUrl' => Request::url().'?'.http_build_query($query),
];
}
return $result;
}