[TW5] New version of the simple calendar plugin

2,492 views
Skip to first unread message

FrD

unread,
May 8, 2017, 1:12:16 PM5/8/17
to TiddlyWiki
Hi,

I've updated my simplecalendar macro. The code is cleaner and it's easier to style days.
Here it is.

Any feedback welcome.

Regards

FrD

PS : I still have to update the datepicker macro that goes along this plugin ... to be done :-)

Andrew

unread,
May 15, 2017, 2:09:03 AM5/15/17
to TiddlyWiki
I just discovered TiddlyWiki today, so pardon if my question has an obvious solution.

I've created a tiddlers titled 2017-05-15 and 2017-05-26 and tagged them Calendar so that I can list them using <$list filter="[tag[Calendar]]" />. I was hoping to be able to drop this in as my "List of days" and color the two days in the calendar, but no such luck!

Is there a way for me to have TW process that macro before it's sucked in as a string in the $:/simplecalendar/Item json? Or could calendarCellCSSFunctions.js somehow be adjusted to allow situations like this? Or, maybe there's a trivial solution to indicating which dates have associated tiddlers that I'm not aware of -- any pointers would be appreciated!

Thanks,
Andrew

FrD

unread,
May 15, 2017, 2:31:38 AM5/15/17
to TiddlyWiki
Hi Andrew,

For now it's not possible to use a filter expression (or a list expression) as an argument to the css functions. But I agree it would be an improvement.
I'll see what I can do to process a filter before feeding the js css function.

Regards

FrD

FrD

unread,
May 15, 2017, 7:08:37 AM5/15/17
to TiddlyWiki
Hi,

I've made an update following the suggestion by Andrew. It allows to use a filter when you select "List of days" (when you want to give a style to a list of days). Just enter the filter in the edit area (like [tag[MyTag]]), and press the Eval filter button. The filter is evaluated and the list of days is created.
Warning :
- there is no error checking at the moment. If the filter returns an error it will appear in the item tiddler (navigate to it by clicking the up chevron button)
- make sure the filter evaluates to a list of days in the right format.

Tell me how it works ...
The new version is at the same address : http://simplecalendar.tiddlyspot.com/

Regards

FrD

PTP

unread,
May 16, 2017, 5:32:49 AM5/16/17
to TiddlyWiki
Hi,
how is it possible to display the actual month and the two following?

FrD

unread,
May 16, 2017, 6:49:25 AM5/16/17
to TiddlyWiki
Hi PTP,

The current version does not provide this feature. But based on the calendar internals it should be possible to build a "quarter" calendar. I'll have a look and keep you posted.

Regards

FrD

Littleagle Thoronaug

unread,
Aug 9, 2018, 5:36:51 AM8/9/18
to TiddlyWiki
Hi FrD.

Is it possible to use a template for a new day tiddler? I'm trying to create a template (or use the default TW Journa template) with some text and tags but I can't see how to do it.

Could you help me?

Thanks for the macro. I really love it!

FrD

unread,
Aug 9, 2018, 10:09:36 AM8/9/18
to TiddlyWiki
Hi Littleagle Thoronaug,

I've uploaded a slightly updated version at http://simplecalendar.tiddlyspot.com/.
With this version you can use the default settings for a new journal title (the one you can modify in the control panel / info / title of new journal tiddlers). For this, in your config tiddler (for your calendar), just put "default" for the "format" index.

        "format": "default"

In order to use a template for your journal tiddler, do the following :
- for the "cellContent" index, use this value : "sc_LinkNavigateToOrCreateViewModeJournal" :

        "cellContent": "sc_linkNavigateToOrCreateViewModeJournal",
- create a tiddler named "NewJournalTemplate" and put inside the text you want and tag it as you wish.

Then you will have to re-execute the calendar macro. Just click on the edit button of the tiddler that contains the macro and then cancel.

You should be good to go.
Please report any problem.

Regards

FrD

TonyM

unread,
Aug 9, 2018, 8:42:25 PM8/9/18
to TiddlyWiki
Frd,

I may have asked this before but just as we can click to open the "journal date tiddler" would it be possible to have links to the dayname, month, Monthyear and year, and create them as needed? This would allow us to create day of week (Mon, Tue), month of year (YYYY-0MM) and year tiddlers. 

Week numbers would also me nice eg; w01 - w52

Thanks for this very helpful tool.

Tony

FrD

unread,
Aug 10, 2018, 4:11:59 AM8/10/18
to TiddlyWiki
Hi TonyM,

To turn the day names into links is not difficult. But as there are only 7 such tiddlers to create, I think it's as easy to create them manually as needed (?) .
As for "MonthYear", for now if you click on it it sets the calendar to the current month and the current year. I don't intend to change this default behaviour ; but I could create an option in the config tiddler (I'll investigate).
About week numbers : it seems a bit complicated, but I'm interested too.

I'll try to work on that during this month.

Regards

FrD

TonyM

unread,
Aug 10, 2018, 5:39:45 AM8/10/18
to TiddlyWiki
Thanks Frd,

The click for current date is nice but It would be nice labeled as such freeing the month Day. However you wish.

Very nice.

FYI the https://github.com/dbushell/Pikaday p[lugin has the option to show the week number.
showWeekNumber show the ISO week number at the head of the row (default false)
I believe it is just another date format on the first day of the week.

Regards
Tony

Regards
Tony

Mat

unread,
Aug 10, 2018, 9:18:29 AM8/10/18
to TiddlyWiki
TonyM wrote:
FYI the https://github.com/dbushell/Pikaday p[lugin has the option to show the week number.

Jumping in without having read the thread fully so fwiw: you can get week number with <<now "0WW">>


<:-)

FrD

unread,
Aug 10, 2018, 9:25:01 AM8/10/18
to TiddlyWiki
Hi,

Thanks a lot ; it will help !

Regards

FrD

Littleagle Thoronaug

unread,
Aug 10, 2018, 1:24:19 PM8/10/18
to TiddlyWiki
Thank you for the fast response.

Well, I think I'm doing something wrong because this don't work for me.

If I change the "format" index in the config tiddler (I tried in CalendarConfigDefault and in a cloned version of this) with "default", clicking on a day will open a tiddler named "default" with the message "This tiddler don't exist".

Then I created a NewJournalTiddler, fill it with my data and changed "cellContent" index as you suggested, and no changes at all. When I click in a day a non-existing tiddler titled with current date appears instead of an editing tiddler. It just like if the "tm-new-tiddler" message isn't working.

I tried this with two different TW files, in two different pc's. Any idea?

FrD

unread,
Aug 10, 2018, 2:54:11 PM8/10/18
to TiddlyWiki
Hi,

I uploaded the new version again to be sure.
If I do the modifications on http://simplecalendar.tiddlyspot.com/ and in Firefox, it works for me.
In Chrome the "default" format works, but not the creation of a journal tiddler from a template.
I'll try to figure that out.

If you use Firefox I suggest you try on http://simplecalendar.tiddlyspot.com/ (modifying the config tiddler for the format and cellContent indexes). It should work. If it fails it probably means you are working with the version that is cached by your browser. At least reload the page.

Then delete the plugin in your TW and import it from the site.

If you work with Chrome, I'm sorry to say you'll have to wait a bit more ...

Keep me posted

Regards

FrD

FrD

unread,
Aug 10, 2018, 4:45:11 PM8/10/18
to TiddlyWiki
Hi,

I think I've fixed the problem. Seems to work fine both in Firefox and Chrome

Please keep me informed.

Regards

FrD

Littleagle Thoronaug

unread,
Aug 10, 2018, 5:44:51 PM8/10/18
to TiddlyWiki
Well, I've been making some tests in both tiddlyspot and my own TW and I think I must have some issues in my file.

Anyway, Chrome seems not to work properly even in tiddlyspot. Even it works well with the template, format:default is still not working. Firefox do works well with your TW in tiddlyspot, but not with mine.
Even I deleted $:/plugins/frd/simplecalendar tiddler, the shadow tiddlers are still there. Is this the normal behaviour? Even more: <<simplecalendar>> macro is still working even the plugin must be deleted. Maybe my TW file is broken in some way.

I've no more time tonight, but I will try with a brand new TW file tomorrow and test it. Will post the results then.

Thank you so much for your time, FrD.

FrD

unread,
Aug 10, 2018, 6:11:58 PM8/10/18
to TiddlyWiki
Hi Littleagle Thoronaug,

I'm very sorry for your troubles.

To delete the plugin :
- go to the sidebar => "More" tab
- then click on "Plugins" (last vertical tab)
- click on "Simple Calendar"
The shadow tiddler shows up. Delete this tiddler. Save and reload.

Then drag and drop the last version of the plugin. Save and reload.

Waiting for your tests tomorrow.

Regards

FrD

Littleagle Thoronaug

unread,
Aug 11, 2018, 4:39:00 PM8/11/18
to tiddl...@googlegroups.com
Hi, FrD.
I've been testing the new version of the plugin. The issues I had yesterday were because I hadn't restarted TW after deleting the plugin so shame on me. Here are the results:

- Firefox:
    +It seems everything is working fine. The only thing I detected is when using "default" fomat only the new journal Title config is used but not tags and text. But maybe this is the behaviour you pretended.
    +In CreateViewMode the NewJournalTemplate works perfectly, even in combination with "default" format. It's a pity that this config can't go directly in edit mode, but it's ok.
- Chrome (chromium):
    + "default" format works well in both Edit and ViewMode.
    + Use of NewJournalTemplate in ViewMode works as well.
    + But there is an issue with Chrome that is a little annoying. Clicking on a day, even with the cellContent in CreateEditMode, doesn't enter the new tiddler in Edit Mode. Instead of that, a tiddler with the text "The tiddler <title> does not exist - click on ..." appears in the Story. That's not really bad at all, but it would be more comfy enter directly the edit mode.
- TiddlyDesktop: I've tested TiddlyDesktop as well, but as I think uses Chrome engine the results are the same above.


EDIT: I forgot to mention that I also made the tests with a new blank TW file, with same results.

I hope this helps you. If you need any other tests, don't doubt to ask me for.
Thanks again for your attention.

Regards.

FrD

unread,
Aug 12, 2018, 1:48:20 AM8/12/18
to TiddlyWiki
Hi Littleagle Thoronaug,

Thanks for the feedback !
Since the templating thing works now for the view mode, I'll re-write the cellContent macros for the edit mode allowing the use of a template.
And now I know where the problem comes from in Chrome.

I'll update the site soon and keep you informed.

Regards

FrD

FrD

unread,
Aug 12, 2018, 2:47:35 AM8/12/18
to TiddlyWiki
Hi,

The updated version is at http://simplecalendar.tiddlyspot.com/
The template "NewJournalTemplate" should work both in edit and view mode.

In the config tiddler, for the "cellContent" index, you have these choices :

- "sc_basic" : just write the number of the day (not clickable)
- "sc_linkNavigateToJournal" : a link to the journal tiddler (existing or not)
- "sc_linkNavigateToOrCreateViewModeJournal" : creates a journal tiddler in view mode based on the template (or navigate to the tiddler if it exists)
- "sc_linkNavigateToOrCreateEditModeJournal" : idem but in edit mode.

Please report any problem

Regards

FrD

Le dimanche 12 août 2018 07:48:20 UTC+2, FrD a écrit :

Littleagle Thoronaug

unread,
Aug 13, 2018, 8:39:23 AM8/13/18
to TiddlyWiki
Hi,

Everything works perfectly now!!

NewJournatTemplate working well in edit and view mode in both FF and Chrome with or without format: "default".
Chrome issue of non-edit mode tiddler is solved too.

So appreciate for your help and your time. This is exactly what I needed. I owe you a beer ;P.

If you need further testing, please, contact me.

Thank you!

FrD

unread,
Aug 13, 2018, 10:23:45 AM8/13/18
to TiddlyWiki
Hi,

You're welcome !
Happy its works as intended and it's useful for you.

Regards

FrD

Index

unread,
May 25, 2020, 2:55:50 AM5/25/20
to TiddlyWiki
Hi, FrD.

Thanks for this very very helpful tool!

But I had a little problem today... If you tag and move it to the sidebar, the buttons at the top of the calendar click will fail. I don't know what's wrong... Could you help me?

Regards.


在 2017年5月9日星期二 UTC+8上午1:12:16,FrD写道:

TonyM

unread,
May 25, 2020, 3:54:59 AM5/25/20
to TiddlyWiki
Index,

This is a very old thread to reopen. However I expect your problem relates to the fact there is not currentTiddler variable set in the side bar,

I suggest wrapping what appears in the side bar with 
<$tiddler tiddler="TheSideBarTiddlerstitle">
...
</$tiddler>

Regards
Tony

Index

unread,
May 25, 2020, 4:38:59 AM5/25/20
to tiddl...@googlegroups.com
Thanks Tony,
Wow, it's working right now! 
Thank you very much for your prompt and helpful reply!

Regards
Index
在 2020年5月25日星期一 UTC+8下午3:54:59,TonyM写道:
Reply all
Reply to author
Forward
0 new messages