Interactive Calendar that shows 2 months instead of 1?

Hello, am looking for an interactive calendar for the TiddlyWiki to display all the coming up deadlines.

I found multiple that has the interactive feature so that I can write and display the deadlines on the cell, but I was not able to find plugins that has the feature of showing two calendar months.

If you use linux, I was looking for something similar like the shell command cal -3.

Any suggestions on how I should implement this or any redirects to the plugin will be great help. Thanks

There are a number of calendar solutions out there but the most comprehensive can be found via https://tiddlytools.com/ Of course one can show the month view more than once to get two or more.

First, view TiddlyTools/Time/Calendar and drag-and-drop the tiddler title into your TiddlyWiki to install the Calendar code.

Then, create a tiddler (e.g., “ShowCal-3”) containing the following wikitext:

\define show(offset)
\import TiddlyTools/Time/Calendar
<$let yyyy={{{ [{!!year}!match[]else<now "YYYY">] }}} mm={{{ [{!!month}!match[]else<now "MM">] +[add<__offset__>] }}}>
<$macrocall $name="showmonth"
   yyyy={{{ [<mm>compare:integer:lt[1]then<yyyy>subtract[1]] ~[<mm>compare:integer:gt[12]then<yyyy>add[1]]     ~[<yyyy>] }}}
     mm={{{ [<mm>compare:integer:lt[1]then[12]add<mm>]       ~[<mm>compare:integer:gt[12]then<mm>subtract[12]] ~[<mm>]   }}}/>
\end

<<show -1>><<show 0>><<show +1>>

Notes:

  • You can click on the << or >> buttons to scroll through the previous/next months.

enjoy,
-e

1 Like

Thank you so much @EricShulman
Works just as I wanted

@sunchaesk,

I just fixed a small bug (!) which wasn’t properly resetting the year number when clicking on the month name in a calendar month heading where the month is in the next or previous year (e.g., clicking on “January 2023”). The result was that instead of resetting to show “December 2022” as the middle month, it would show “December 2023” (oops!).

To apply the update…

  • Install a fresh copy of TiddlyTools/Time/Calendar (updated on “Wed, Dec 28th 2022, 08:20:32pm” or later)
  • Edit your “ShowCal-3” tiddler and change this line:
    <$macrocall $name="showmonth" to <$macrocall $name="showmonth" view="3-month"
    (i.e., add view="3-month" param to use fixed click handling)

enjoy,
-e