non-JS Calendar

You can add additional date formats in the tiddler $:/plugins/EventCal/cell/contents by adding [contains:cal-date<my-format>] to the <$list> filter (before the +[sort[]]) and defining my-format in a <$let> outside of the <$list>. You can use variables to put together your format as described in the ReadMe in the 3rd tab.

So, for ISO format, try putting [contains:cal-date<iso-date>] in the <$list> filter and then define iso-date like:

<$let iso-date={{{ [{!!cal-yy}][{!!cal-mm}][<date>]+[join[-]] }}} >
<$list of [contains:[]]...
...>
</$let>

and that should give you YYYY-MM-DD as the format. If you need times too you’ll need to define more variables and maybe join it in a different way.

1 Like

The tiddler $:/plugins/EventCal has \procedure cell(), you can tweak the cell contents there as well as the tiddler $:/plugins/EventCal/cell/contents.

The day view is activated by the presence of the field date with the value date in DD format. You can make conditions like:

<$list filter="[<parentTid>has[date]]">
stuff you want displayed in date view
</$list>

<$list filter="[<parentTid>!has[date]]">
stuff you want displayed in month view
</$list>
1 Like

very thanks @hoopyfrood. That was perfect for my usecase. In my current version, I can press the date in month view to open the single day view with new additional cell contents. Thanks for all your help.

Your calendar is really well set. I’m french and I wanted to translate the name of days and month.
First I translated the $:/plugins/EventCal/data/week replacing Sun with Dim and so on.
Then I thought those days names were part of the TW core. So I tried to replace Sun by {{$:/language/Date/Short/Day/0}} and it worked!

So here is the adaptation of $:/plugins/EventCal/data/week :

0: {{$:/language/Date/Short/Day/6}}
1: {{$:/language/Date/Short/Day/0}}
2: {{$:/language/Date/Short/Day/1}}
3: {{$:/language/Date/Short/Day/2}}
4: {{$:/language/Date/Short/Day/3}}
5: {{$:/language/Date/Short/Day/4}}
6: {{$:/language/Date/Short/Day/5}}
7: {{$:/language/Date/Short/Day/6}}
8: {{$:/language/Date/Short/Day/0}}

This let your calendar to be translatable via language plugins !

But I didn’t find the way to modify the months names. It is inserted in $:/plugins/EventCal in a $select option and I don’t know how to modify the enlist refer to the $:/language/Date/Short/Month tiddlers’ content.

<$select field="cal-mm"
actions=<<createMonth>>>
<$list filter="[enlist[01 02 03 04 05 06 07 08 09 10 11 12]]" variable="m">
<$let x={{{ [enlist[Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec]nth<m>] }}}>
<option value=<<m>>><<x>></option>
</$let>
</$list>
</$select><$edit-text 
1 Like

To get the “short month name” for the current language, use:

<$let x={{{ [[$:/language/Date/Short/Month/]] [<m>trim[0]] +[join[]get[text]] }}}>

-e

5 Likes

Hello @arunnbabu81
if you have a moment, could you please post an example of your case here or online at tiddlyhost
I would like to see what you have done

I will share a rough demo in some time soon

Thank you, I am very interested in seeing individually dated tiddlers with varied contents.

@Sunny This is a rough version. I removed the pop up and plan to add the tiddler creation buttons in the single day view. But for that I need to decide on the UI and my usecases. Still haven’t go time to do it.

2 Likes

Thanks @arunnbabu81
I’m sure your busy and I appreciate you taking the time to show me your example.
I’ll have a look and figure out how to add more content etc
Thanks again.

Thank you so much for this! I will update and reupload to the tiddlyhost site soon.

Awesome! A minor adjustment, use trim:prefix[0] instead so it doesn’t trim the “0” in “10” (I was wondering why “Oct” was showing as “Jan”, which coincidentally have the same date pattern this year)

<$let x={{{ [[$:/language/Date/Short/Month/]] [<m>trim:prefix[0]] +[join[]get[text]] }}}>
1 Like

Were you able make some progress ?
If you need some help, feel free to tag me

I have updated the tiddlyhost site with EricShulman and Thomas_Chuffart’s code, and compartmentalized some stuff to make it easier to customize (dedicated tiddlers for Single Day/Full Month view contents, add custom date formats and rules). See the ReadMe for details.

Does this calendar have the ability to keep separate calendars? What if I want my “Sleep” calendar to be separate from my “Did” calendar?

I downloaded this most recent calendar (update 3). I created a tiddler titled SLEEP and put {{SLEEP||$:/plugins/EventCal}} in the text field. I created a second tiddler titled DID and put {{DID||$:/plugins/EventCal}} in the text field. But events entered in the SLEEP calendar still showed up in the DID calendar, and vice versa.

(I also tried {{||$:/plugins/EventCal|SLEEP}} but it still didn’t work at keeping keeping the two calendars separate.)

What should I do?

Not as is, but I think some modifications could achieve what you want.

The calendar can display tiddlers that have the date attached to them in some way, my default way being a field called “cal-date” that has the date in YYYY0MM0DD, 0DD, ddd, or YYYY-MM-DD formats, plus or if the title has the date in DDth MMM YYYY format like the default journals. This can be customized to look for a custom date format in a different field besides “cal-date” or even as a tag.

The filter that determines what tiddlers to display is in the tiddler $:/plugins/EventCal/cell/dateview. If you were to add +[tag[SLEEP]] to it, it would only display tiddlers that have the date in some format if it also has the SLEEP tag. You would have to write some more UI bits, or perhaps add a parameter, to make it work with multiple tags that you can switch between. (You could also specify which sub-calendar you are displaying using different operators in that filter that is on $:/plugins/EventCal/cell/dateview, instead of +[tag[some-tag]]).

I’ll see if I can work on adding this as a feature, but if you want to fiddle with it that’s where to start.

Sorry, @arunnbabu81 no not yet.
I was thinking of using a modal, having seen @DaveGifford’s writing wiki and I have also been looking at Jed Carty’s Calendar Archives and the plugin which creates Calendar Month views which when clicked open that dates tiddler.
At the moment I am currently dealing with some family stuff, but will try later when time allows.

Hello @arunnbabu81
just another thought regarding my previous post, have you read this post. It add a button to a tiddler that allows notes to be added to each tiddler but stores all the notes in $:/note-database. Each calendar date could have it’s respective journal/note tiddler and store the respective notes or instructions etc in the $:/note-database for future editing and searching.

1 Like

I got that working now, check out update 4. Just tag the event-tiddlers that you want with “SLEEP” or “DID” and then make tiddlers for those tags and tag them with cal-tag. This will make those tags an option in the drop down menu.

1 Like

This could be useful depending on your use case, what would you like to see in a calendar?