Home › Forums › Calendar Products › Events Calendar PRO › Week View day start and end times
- This topic has 8 replies, 3 voices, and was last updated 8 years, 11 months ago by Brian.
-
AuthorPosts
-
June 10, 2015 at 3:54 am #968376twkmediaParticipant
Hi All,
Does anyone know of a way of setting the start and end times of days in the calendar Week View. At present it is from 24 hour, from 12:00 – 12:00. Ideally we would like to change this to 7:00 – 20:00.
Thanks
June 10, 2015 at 9:14 am #968486BrianKeymasterHi,
Thanks for using our plugins.
There is not method in the current version to change Week View as you ask.
However, we are about to release 3.10 in the next week or so and that has this ability.
You can read about it under the new features section of this article:
https://theeventscalendar.com/week-view-refactor/
Let me know if you have any follow up questions.
Thanks
June 25, 2015 at 4:48 pm #973044ChristinaParticipantBrian,
Where do I customize what hours are displayed on the Week View grid? I want to show a limit of the time view from 8am – 9pm.Please advise ASAP… thanks!
June 26, 2015 at 4:43 am #973111BrianKeymasterHi Christina,
If you follow that link in my previous reply and look at the New Features section it has a filter in it to do what you are asking. If you have issues with that filter please create a new thread and we can help you one on one.
Cheers
June 26, 2015 at 8:39 am #973201ChristinaParticipantMorning Brian
I can’t see/find where that filter is in the settings for the Calendar Pro… Is it a .php file that needs to be edited?
I see that it’s ‘tribe_events_week_get_hours’ but WHERE is that filter located.
Thanks!
ChristinaJune 26, 2015 at 9:03 am #973215BrianKeymasterThis is the filter:
Add that to your theme’s functions.php and change the 7 and 18 to the times you would like to display.
add_filter( 'tribe_events_week_get_hours', 'filter_week_hours' );
function filter_week_hours( $hours ) {
$hour = 0;foreach ( $hours as $key => $formatted_hour ) {
if ( $hour < 7 || $hour > 18 ) {
unset( $hours[ $hour ] );
}$hour ++;
}return $hours;
}
June 26, 2015 at 9:14 am #973221ChristinaParticipantI’m assuming that this can be added to the end of the existing code? or is there a specific point of entry I should be looking for?
Many thanks for the assist!
CJune 26, 2015 at 9:31 am #973227ChristinaParticipantThat worked! thank you.
June 26, 2015 at 10:28 am #973236BrianKeymasterGreat glad it helps.
I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.
Thanks
-
AuthorPosts
- The topic ‘Week View day start and end times’ is closed to new replies.