• Resolved Artur Burkalo

    (@aburkalo)


    Hi There,

    I am looking to change the time interval to 75 mins, when I do it strange things happen, so tables are booked at specific times only.

    I modified a code that works fine with any other value other than 75 mins.

    if ( !function_exists( 'extend_minutes_greenfox' ) ) {
         add_filter( 'rtb_settings_page', 'extend_minutes_greenfox' );
        function extend_minutes_greenfox( $sap ) {
        
            $sap->add_setting(
    			'rtb-settings',
    			'rtb-schedule',
    			'select',
    			array(
    				'id'			=> 'time-interval',
    				'title'			=> __( 'Time Interval', 'restaurant-reservations' ),
    				'description'	=> __( 'Select the number of minutes between each available time.', 'restaurant-reservations' ),
    				'blank_option'	=> false,
    				'options'       => array(
    					'180' 		=> __( 'Every 180 minutes', 'restaurant-reservations' ),
    					'120' 		=> __( 'Every 120 minutes', 'restaurant-reservations' ),
    					'90' 		=> __( 'Every 90 minutes', 'restaurant-reservations' ),
                        '75' 		=> __( 'Every 75 minutes', 'restaurant-reservations' ),
    					'' 			=> __( 'Every 30 minutes', 'restaurant-reservations' ),
    					'15' 		=> __( 'Every 15 minutes', 'restaurant-reservations' ),
    					'10' 		=> __( 'Every 10 minutes', 'restaurant-reservations' ),
    					'5' 		=> __( 'Every 5 minutes', 'restaurant-reservations' ),
    				)
    			)
    		);
        
                return $sap;
        }
        } // endif;

    The time I set is 9 am, and the time only begins at 10 am and goes from there in 75 min intervals?

    I’ve tried to update the jquery and just set the interval to 75 mins and the same thing was happening again.

    Part of the code

    var time_input = $time_input.pickatime({
    					format: rtb_pickadate.time_format,
    					formatSubmit: 'h:i A',
    					hiddenName: false,
    					interval: 75,
    					container: 'body',
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hi aburkalo,

    The time intervals start at midnight and work from there. So, for a 75-minute interval:

    00:00
    01:15
    02:30
    03:45
    05:00
    06:15
    07:30
    08:45
    10:00

    10:00 is the first available time slot after your start time of 09:00. That’s why it’s showing as you mentioned.

    Thread Starter Artur Burkalo

    (@aburkalo)

    @jaysupport thanks for the help, I modified the time picker and it’s working fine now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Interval Time’ is closed to new replies.