tinypops Posted November 23, 2021 Share Posted November 23, 2021 (edited) I would like to display the day of the week (in all caps) in front of my dates on my event summary pages. i.e. THURSDAY, February 3, 2022 I am currently using this code on the actual events page in the Page Header Code Injection, but its not capitalizing the days or carrying over to the summary pages. Am I putting it in the wrong place? Do I need to add additional code? and if so, where? I'm on brine 7.0. <style> var d = new Date(); var days = ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"]; var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; document.getElementById("demo").innerHTML = days[d.getDay()] + " " + months[d.getMonth()] + " " + d.getDate() + " " + d.getFullYear(); </style> Edited November 23, 2021 by tinypops Beyondspace 1 Link to comment
Beyondspace Posted November 23, 2021 Share Posted November 23, 2021 5 hours ago, tinypops said: I would like to display the day of the week (in all caps) in front of my dates on my event summary pages. i.e. THURSDAY, February 3, 2022 I am currently using this code on the actual events page in the Page Header Code Injection, but its not capitalizing the days or carrying over to the summary pages. Am I putting it in the wrong place? Do I need to add additional code? and if so, where? I'm on brine 7.0. <style> var d = new Date(); var days = ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"]; var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; document.getElementById("demo").innerHTML = days[d.getDay()] + " " + months[d.getMonth()] + " " + d.getDate() + " " + d.getFullYear(); </style> Coudl you share the site url where you use this code? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
tinypops Posted November 23, 2021 Author Share Posted November 23, 2021 (edited) edited: @bangank36 I used this code in the injection header of this event page:https://contrabass-round-d5yj.squarespace.com/new-events But the summary block i want it to effect is here:https://contrabass-round-d5yj.squarespace.com/agenda pass: wethepeoplesbefore Edited November 23, 2021 by tinypops clarity of information Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment