Okay
  Public Ticket #2235255
Displaying more than 3 events in monthly calendar view
Closed

Comments

  • tomtyterry started the conversation

    This is located on an internal website so I can't share the URL but, I'd like to display 4 events in monthly calendar view instead of 3.  Also, is it possible to show just the work week in monthly view?  See attachment.

    Thanks

  •  877
    Zhivko replied

    Hi,

    The design at the moment is such that only 3 events can be displayed and all extra events will be shown as +n at the bottom. Week view does not have this restriction. 

    To remove sunday and saturday add this code in your theme functions.php file at the bottom:

    // Removes sunday and saturday from month view
    // Note to work properly set in General settings -> First day of the week to monday
    add_action('stec_after_html', function() {
        ?>
        <script type="text/javascript">
            (function ($) {
                $.stecExtend(function (m) {
                    
                    m.$instance.$month.find('.stec-layout-month-daylabel td:gt(4)').hide();
                    m.$instance.$month.find('.stec-layout-month-daylabel td:eq(4)').css({
                        borderTopRightRadius: 3,
                        borderRight: 'none'
                    });                 m.$instance.$month.find('.stec-layout-month-weekrow').each(function () {
                        $(this).find('.stec-layout-month-daycell:gt(4)').hide();
                        $(this).find('.stec-layout-month-daycell:eq(4)').css('border-right','none')
                    });                 m.$instance.$month.find('.stec-layout-month-eventholder > td').prop('colspan', 5);             });
            })(window.jQuery);
        </script>
        <?php
    });



    Stachethemes Developer