Jump to content
  • 0

Is It Possible To Display Only First Letters Of Weekdays In Calendars?


Cameron
 Share

Question

3 answers to this question

Recommended Posts

  • 0

Hello Cameron,

 

I tried to find the setting, but I didn't find anything.

I used the script code (add Header&Footer element, select the Footer, click the Source button and enter the code):

<script>
var header_cells = document.getElementsByTagName("th");
for (i = 0; i < header_cells.length; i++)
{
   header_cells[i].innerHTML = header_cells[i].innerHTML.slice(0,1);
}
</script>

I know, that it isn't the best solution, but it works.

Link to comment
Share on other sites

  • 0

Oh. You can use pairs of values and display "wanted" values instead of "current", it will be better.

 

I have used the following script code:

<script>
var current_values = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var wanted_values = ["Snd", "Mnd", "Tue", "Wdn", "Thu", "Fri", "Sat"];
var header_cells = document.getElementsByTagName("th");
for (i = 0; i < header_cells.length; i++)
{
   for (n = 0; n < current_values.length; n++)
   {
     if(header_cells[i].innerHTML == current_values[n])
        header_cells[i].innerHTML = wanted_values[n];
    }
}
</script>

You can enter your values instead of

["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]

and

["Snd", "Mnd", "Tue", "Wdn", "Thu", "Fri", "Sat"]

 

 

In the result, the values from the second list will be displayed instead of correspond values of the first list.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...