Using HTML in calendar labels

p38

Active Member
Hi,

Is it possible to use html in the calendar labels?

eg: 'Paul Bailey <br> adds a new line'

Is see the popup window does allow this, but the labels do not.

If this is allowed, it will help very much in formatting labels to fit

Paul
 
Have you tried putting HTML in the labels?

I'm a little unclear as to whether you are just asking, or if you've tried and it doesn't work.

-- hugh
 
yup I tried it by putting a simple <BR> tag inbetween a concat label. It shows the <BR> in the label.

However, on clicking the event, the popup seems to interpret it correctly.

Paul
 
So just to make sure I'm testing the right thing ... your label element for the calendar is a join element, which you are using a CONCAT label for, with a BR tag in the concat statement?

-- hugh
 
yup, I used the <BR> tag to force a newline so I could display the label better.
eg:

'<strong>',{thistable}.surname,',</strong><br>',{thistable}.name

should give

Bailey,
Paul


Ideally, any html tag would be beneficial eg <strong>.

If I am not mistaken, the event popup, when clicked, does actually interpret the html correctly.

Paul
 
The issue here is that random HTML can completely trash the labels, so we strip it out I'm afraid.
 
any way we can get around it?

The calendar viz is extremely limited if it allows only plain text, as there is no clean way to display data that has long elements, or even many items on a single day entry.

As a compromise, perhaps you can allow the most common basic items, eg <P><STRONG><EM><U><BR>

Paul.
 
have you considered that there are several options for showing the detailed view of the record? The idea of the tip is to give simply the event title, not to put in long sections of html
 
problem is, if you have 10 entries on a day, each having similar titles, the user will spend oodles of time trying to click each entry to view the detailed info, looking for the record he is interested in.

eg:

Paul Bailey : Instructor
Paul Bailey : Duty Pilot
Paul Bailey : Winch Driver
etc ect

and cutoff, because the cell is not wide enough gives you.....

Paul Bailey : In
Paul Bailey : Du
Paul Bailey : Wi

So which one would you choose?


My idea, using very basic html I gave you is to do this.......
Paul Bailey :
Instructor
Paul Bailey :
Duty Pilot
Paul Bailey :
Winch Driver

because I can make the cells vertical height as long as I want, it will fit in very nicely.

Paul.
 
We're not actually stripping the tags, it's really just because we're using appendText(label) in the JavaScript to insert the label into the span in the anchor tag, which doesn't render markup. I've changed the code to use set('html', label) instead, which should render your markup.

-- hugh
 
ah that was my bad, should be fixed in github and I updated your site with the changed file

-Rob
 
  • Like
Reactions: p38
spot on guys, thanks another job well done.

I think this is a nice step up to the calendar viz, perhaps make a note of this feature in the tooltip sometime, I am sure MOST folk will use this.

Paul.
 
hi rob, can you please just check, I notice the <strong> tag does not work, only <br> and <em>

Just to confirm, we can now use any markup?
 
strong or any other markup should work - depends of course on what styling is applied by the template as to whether you can see a visible change
 
friendly bump

ah that was my bad, should be fixed in github and I updated your site with the changed file
-Rob
hi rob, did you perhaps forget to update github. Just updated latest and we back to square one with all events missing.

Paul
 
friendly bump please can we have the working version back, last update it stopped.

further investigation turns up the following.....

it shows events under the following...

Start Date and End Date are exactly the same.
End Date is ignored.

It does not show events if the "End Date" is different to the Start Date, eg........

Start_Date 2013-10-08 08:00:00
End_Date 2013-10-08 12:00:00

Paul
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top