How i can disable the scroll in the calendar?

Home Forums Calendar Products Events Calendar PRO How i can disable the scroll in the calendar?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1465062
    angelidelbello
    Participant

    Hi,
    i set my calendar with the week view and i want disable the scroll inside or start calendar view from 8am because before there are a lot of blank rows. Can i show only one time slot? Can you help me?
    Thank’s a lot!
    Angeli del Bello

    #1466517
    Jennifer
    Keymaster

    Hi Angeli!

    We actually have a snippet that will let you set the timeframe that you want to be shown in week view. You can add this to the functions.php file of your child theme:

    /**
    * Description: Set the timeframe that should be shown in the week view.
    *
    * Usage: Copy the snippet in your theme's (preferably child theme's) functions.php file.
    * Adjust the $start_of_day and $end_of_day variables according to your needs.
    *
    * Plugins: The Events Calendar, Events Calendar Pro
    * Author: Andras Guseo
    * Last Updated: February 13, 2018
    */

    add_filter( 'tribe_events_week_get_hours', 'filter_week_hours' );
    function filter_week_hours( $hours ) {
    // Set the desired times here
    $start_of_day = 9;
    $end_of_day = 17;
    $hour = 0;
    foreach ( $hours as $key => $formatted_hour ) {
    if ( $hour < $start_of_day || $hour > $end_of_day ) {
    unset( $hours[ $hour ] );
    }
    $hour ++;
    }
    return $hours;
    }

    Let me know if this works for you!

    Thanks,

    Jennifer

    #1467533
    angelidelbello
    Participant

    Perfect!
    Thank’s a lot Jennifer!

    Angeli del Bello

    #1467627
    Jennifer
    Keymaster

    No problem!

    Since this has been marked “resolved”, I’ll go ahead and close it out. If you have any other questions, please feel free to open up a new thread!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How i can disable the scroll in the calendar?’ is closed to new replies.