Home › Forums › Calendar Products › Events Calendar PRO › Change grid height in week view
- This topic has 5 replies, 2 voices, and was last updated 9 years, 11 months ago by
Geoff B..
-
AuthorPosts
-
May 25, 2016 at 6:41 am #1118656
Matthias
ParticipantHello there
I was trying to change the grid height of the week view. Setting another value in CSS instead of the 60px does the trick at first. But then the events that are included via Javascript don’t have the right height, as the height is calculated with the help of the duration. Is there any way to change that anywhere?
Thanks,
MatthiasMay 25, 2016 at 9:59 am #1118766Geoff B.
MemberGood evening Matthias and welcome to the Events Calendar Support forum!
Thank you for reaching out to us.
I would love to help you with this topic.
To do a better job at answering, I would need a few screenshots and/or URLs to look at your specific situation.
Also, as a first troubleshooting step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
With that in mind, if you had a higher hierarchy CSS rule (through specification), it should normally have priority, even with JavaScript at play. Here’s an example of what that would look like:
.tribe-week-grid-wrapper .tribe-week-grid-block {
height: 80px!important;
}Best regards,
Geoff B.
May 26, 2016 at 2:19 am #1119059Matthias
ParticipantThis reply is private.
May 26, 2016 at 2:29 am #1119061Matthias
ParticipantHey Geoff
Thanks for your reply! I sent you a private reply with my system details as well. Attached is a screenshot of my calendar as well. As you can see, the problem is not the CSS settings. I have already overwritten the default styles and increased the height of the div-blocks.
My problem is within the Javascripts. The height of the event is calculated with the help of the duration within the tribe-events-week.js:
line 225:
event_length = $this.attr( "data-duration" )As the duration of the event is 2 hours the length is 2x60min, so 120px. But as I set the div height of an hour to 100px in CSS, I would need to recalculate that Javascript value so it returns 200px. Is there kind of a best way to do that?
Thanks,
MatthiasMay 26, 2016 at 2:57 am #1119066Matthias
ParticipantHey Geoff
Writing the above reply made me digging into the code a bit deeper again. I solved my issue now by myself using the tribe_events_week_event_attributes filter that is used within the single-event.php.
There I fetched the event attributes and recalculated the event duration. I hope it doesn’t bring me into any other trouble on any other parts of the site…
Thanks,
MatthiasMay 26, 2016 at 2:34 pm #1119409Geoff B.
MemberHello Matthias,
Wow! I’m super impressed on such excellent work!
Thank you for sharing for everybody’s benefit!
You are welcome back on our support forums any time 🙂
For now, I am going to close this thread.
Have a great week!
Geoff B.
-
AuthorPosts
- The topic ‘Change grid height in week view’ is closed to new replies.
