How to get bjtools Extendable Calendar to display the contents of a field

Hi @buggyj, I wonder whether I could nudge you to make one further tweak to your javascript macro.

It currently creates a table with wikitext pipes, which may be fine (my impression is that some here recommend html tags for tables that can get complex, but I’m not sure what’s at stake in that)… Certainly, your plugin is light and relatively easy to reverse-engineer!

However, as far as I can tell, the only way to style the calendar, currently, is to cast such a wide net as to restyle all tables in the wiki:

table {width:100%; }
table * th {background-color: <<colour tab-background>>;}
table * td {width:5em; height: 2em;}

Splicing in a class for the calendar tables such as
|calendar|k
would enable people to target the calendar tables for styling.

Even better would be letting the table class be specified as a further parameter of the macro (!), since that way one could specify, with css alone, that certain details should be hidden. For example, a calendar in the sidebar could be invoked with cal-minimal class, etc.)

Is this an easy tweak?

@buggyj Thank you so much for giving us all these calendar options. It is such a good feeling having a way to look back at one’s whole life in a glance with this calendar.

Hope you can link to all these examples on the main BJ Tools site, so that other amateurs like me can find them.

@Springer Thank you for your help even while being a busy teacher. If you ever wrote an article on time management, I would read it.

@Springer I wrote the calendar plugin back in Jan 2014 it was my first attempt at TW5 coding. It is very different to how I write stuff for TW now. But as you say it is very ‘light’ and easy to read… I have added in the classes I will make a new release soon.

2 Likes

I’m afraid part of my time-management “expertise” is that when I want to take a break from the conceptually messy challenges of my day-job — which is often enough! — I come hang out at this forum. :stuck_out_tongue_winking_eye:

  1. The part in bold is not working

\define diarydets(i,tiddlerDate,rawDate,tags)
$i$

<$list filter ="[tag[Journal]search:journal-date[$rawDate$]!is[system]]"><$link>{{!!journal-day-summary}}</$link>
<image-basic img:"{{!!journal-entry-thumbnail}}" width:“20%” align:"" caption:"" tooltip:"" alt:""></$list>
\end

(Example of what is in the journal-entry-thumbnail field: Journal Pics and Vids/2025/2025-06-08_1310_08974.jpg)

  1. Also, how do I tell it to only display the contents of the journal-entry-thumbnail field if the field is not empty?

Thanks for any help. I’m really enjoying the calendar.

maybe:

<<image-basic img:{{!!journal-entry-thumbnail}} width:“20%” align:"" caption:"" tooltip:"" alt:"">>

try

<%if [all[current]has[journal-entry-thumbnail]] %>
<<image-basic img:{{!!journal-entry-thumbnail}} width:“20%” align:"" caption:"" tooltip:"" alt:"">>
<%endif%>

Looks like image-basic is a macro/procedure. TW doesn’t allow variable parameter values like {{!!journal-entry-thumbnail}} with the shortcut macro/procedure call syntax.

You can try with the complete widget syntax like this:

<$macrocall $name="image-basic" img={{!!journal-entry-thumbnail}} width="20%" align="" caption="" tooltip="" alt="" />

Also, there were some typographic double-quotes in the original code here: width:“20%”, these won’t work in TW widgets/macros.

Hope this helps,

Fred

1 Like

So sorry it did not work for me even when I updated to 5.3.6.

This works but it puts the styling in the field not in the macro, which makes mass styling impossible, so it is not a solution either:

\define diarydets(i,tiddlerDate,rawDate,tags)
$i$<br>
 <$list filter ="[tag[Journal]search:journal-date[$rawDate$]!is[system]]"><$link>{{!!journal-day-summary}}</$link><br>{{!!journal-entry-thumbnail}}</$list>

\end

Field content:

<<image-basic img:"Journal Pics and Vids/2025/2025-06-08_1310_08974.jpg" width:"20%" align:"" caption:"" tooltip:"" alt:"">>

1 Like

@tw-FRed Success! Using the complete widget syntax works! Thank you all!

3 Likes

How do I get the square at the top of @buggyj 's Extendable Calendar (the square that displays “July 2025”) to also display the contents of a tiddler’s “month-summary” field?

For instance, if I have a tiddler with the journal-date field containing “20250700000000000” and the “month-summary” field containing “Climbed 8 mountains”, how do I get “Climbed 8 mountains” to show up centered 2 lines below July 2025?

Or forget the month-summary field, what if I just want the contents of that tiddler (i.e. the text field) to show up under the July 2025?

Thanks in advance for any help.

I think this is possible with a small change to the macro - I will have a think and let you know.

I have added a month summary - see https://bjcanendar-mod.tiddlyhost.com/

2 Likes

So sorry I could not quite get the month summary to work.

Using the site https://bjcanendar-mod.tiddlyhost.com/ I created a tiddler titled 2024 May Summary tagged it with journal-month-summary, put 20240500000000000 in the journal-date field, and put in the text field:

In May I hiked Great Britain. [Not really. I wish.]

"""
Week 1: Hiked England
Week 2: Hiked Scotland
Week 3: Hiked Skye
Week 4: Hiked Ireland
"""

Then I made sure your ExampleWithSummary tiddler contained this:

\define diarydets(i,tiddlerDate,rawDate,tags)
$i$<br>
 <$list filter ="[tag[Journal]search:journal-date[$rawDate$]]">{{!!journal-day-summary}}</$list>
\end

\define summarydets(i,tdiddlerDate,rawDate,tags)
<$list filter ="[tag[journal-month-summary]search:journal-date[$rawDate$]!is[system]]"><$link><$transclude field="text" mode="block"/></$link></$list>
\end

<<newdiary 2024>>

The Problem: The month summary for May 2024 appeared in every single month, not just the month of May.

I don’t know what I’m doing wrong. I don’t know what i,tdiddlerDate,rawDate,tags are for either, I just acted on a hunch and copied the \define diarydets line above. (I did one time, a year or so ago, successfully create my first personal-use-case /define using groktiddlywiki, but it was my first and last /define and I have forgotten what it was and all I knew about them.)

Thank you in advance for any help and all the wonderful calendar modifications you have helped me with in the past.

the summary is like this:

\define summarydets(mnth,year)
this is the year $year$ and month $mnth$
\end

it is a standard tw macro with parameters mnth and year, so it is flexible.

Probably the simplest way to use it is to have tiddler titles like ‘2024 7 summary’ and define your macro as

\define diarydets(i,tiddlerDate,rawDate,tags)
$i$<br>
 <$list filter ="[tag[Journal]search:journal-date[$rawDate$]]">{{!!journal-day-summary}}</$list>
\end

\define summarydets(mnth,year)
{{$year$ $mnth$ summary}}
\end

<<newdiary 2024>>

Thank you! It works beautifully! And I understand the variables now.

I am using it like this in order to get mode=block:

<$transclude $tiddler="$year$ $mnth$ Journal Summary" $field="text" $mode="block"/>

UPDATE: It works beautifully on your website, but not in my wiki :frowning:

ON YOUR SITE

Even on your site, when I put <<newdiary 2024>> into a new tiddler, the month summary did not show up until I tagged your ExampleWithSummary tiddler (containing the summary define) with $:/tags/Macro … then the summary showed up even in the new tiddler.

IN MY WIKI

On my wiki, it is the $:/bj/macros/Calendar/diarydetsmacro that contains the summary define:

\define diarydets(i,tiddlerDate,rawDate,tags)
$i$<br>
 <$list filter ="[tag[Journal]search:journal-date[$rawDate$]!is[system]]"><$link>{{!!journal-day-summary||journal-entry-summary}}</$link><br><$macrocall $name="image-basic" img={{!!journal-entry-thumbnail}} width="20%" align="" caption="" tooltip="" alt="" />
</$list>

\end

\define summarydets(mnth,year)
{{$year$ $mnth$ summary}}
\end

However even though that tiddler is tagged with $:/tags/Macro, no summaries are showing up in your calendars on my wiki.

I have your monthly calendar showing up on every month of Mohammed’s Journal-book (see this thread How can Journal Book be modified to show a Calendar if a Month is clicked - #10 by buggyj).

At first I thought that was somehow the complication but even when I created a simple new tiddler with nothing but <<newdiary 2024 7>> in it, it still does not show the summary. Even though $:/bj/macros/Calendar/diarydetsmacro is tagged with $:/tags/Macro.

So my wiki is at fault somehow, but as I can not share my personal wiki, I do not think I will be able to ask for help on it again until I have time to set up a tiddlyhost site with the Journal-Book combined with your calendar.

However thank you so much for what was solved, and maybe something will occur to me later.

I forgot to update the plugin, I have updated the version here https://bjcalendar.tiddlyhost.com/, with the monthly summary.

1 Like

Added a month summary example: Extenable Calendar

1 Like

Loved your example. Hope you are getting warmer at home.

I imported your updated version from https://bjcalendar.tiddlyhost.com/ by going to MORE then PLUGINS and dragging and dropping the calendar plugin into my wiki.

Unfortunately it wipes out all the changes you helped me with previously: specifically allowing the day-summary version of each month to show up at the head of whichever month is clicked in Mohammed’s Journalbook. Instead, the plain version with no summaries at all now shows up in his Journalbook at the head of whichever month is clicked.

This happens even outside the Journalbook when I simply call up <<newdiary 2025>> in a new tiddler.

At first I wondered if it was because that day-summary functionality was possibly given to me at this site https://bjcalendarext.tiddlyhost.com/ (instead of https://bjcalendar.tiddlyhost.com/) as mentioned in How to get bjtools Extendable Calendar to display the contents of a field - #7 by buggyj, and which was not updated with your most recent plugin for including month-summaries.

Then I noticed this old post How to get bjtools Extendable Calendar to display the contents of a field - #11 by buggyj where you said you had removed a demo file blocking the global macro. Could it be that there is a demo file blocking the global macro again?

Something that makes me think this could be the case is because about two weeks ago in desperation I simply downloaded a copy of your WHOLE wiki (the https://bjcanendar-mod.tiddlyhost.com/ version) off tiddlyhost (by adding /download to the address) and have been using it quite enjoyably as a schedule calendar on my mobile. (I only worry that doing it this way may contain unknown security risks and meant to ask you about it.) But the point is that it did work, when even pulling just your plugin from that particular latest site into an empty new Tiddlywiki did not work. So could it be a demo file blocking a global macro?

There is always the possibility that it is none of the above and I simply need to comb over all the code to see what changed.

Thank you so much for this calendar. It is beautiful.

The diarydets is not defined in the plugin, I think you are missing your $:/bj/macros/Calendar/diarydetsmacro tiddler and so the macro is not defined,