Pikaday Plugin: A Repack of Date Picker from Projectify

A date-picker with calendar widget to pick a date and set to due field of target tiddler.

This is a derived plugin from Projectify by Nicolas Petton nicolas@petton.fr

Pikaday adds several widgets to Tiddlywiki allowing, to pick a date, and set due to today, tomorrow, next week, or desired date. It shows due date and overdues for tiddlers with due field

Code and demo

NOTE:

  1. All kudos and credits belong to Nicolas Petton
  2. This repack has been done with permission.
  3. This plugin is used as part of Task manager in Mehregan

References

  1. Projectify plugin
  2. Date Picker plugin — based on Pikaday
  3. Pikaday
8 Likes

Back in the day, kixam also made a date picker based on Pikaday:
http://kixam.github.io/TW5-datePicker/
https://github.com/kixam/TW5-datePicker
It is based on v1.6.1 of Pikaday and hence is a bit outdated. I couldn’t find what version of Pikaday yours is based on.

That was one of the first plug-ins in my TW. :grinning:

Have a nice day
Yaisog

Yes, I think he is the first who adopted Pikaday for Tiddlywiki.

I think the kixam date-picker needs moment.js!

Thank you for putting this together, @Mohammad ! I was trying to figure out how to use this piece of Projectify without importing all of it. This will be a great help.

I think it does. Yours doesn’t? :heart_eyes:

1 Like

Is there an easy way to create a list of overdue tiddlers? I think it would be a great addition to the documentation.

I’m having some trouble getting the syntax right… I tried this, but it doesn’t work:

<$vars target=<<now YYYY0MM0DD0hh0mm0ssXXX>>>

<$list filter="[get{!!due}compare:integer:gt<target>]" />

Yes!

<$vars target=<<now YYYY0MM0DD0hh0mm0ssXXX>>>

<$list filter="[tag[todo]] :filter[{!!due}compare:date:lt<target>]" />

</$vars>

A better solution

<$list filter="[all[tiddlers]!tag[done]tag[todo]!has[draft.of]!days:due[-1]sort[due]]" />

Ref: https://tiddlywiki.com/#days%20Operator

1 Like

That’s much clearer - thank you, @Mohammad !

I may have a use for this, but I would neet the years to go back way more than 2012. For historical applications, I’d like to see the year be selectable back at least 200 years or so. How would I go about modifying things to accomplish this? It wasn’t obvious to me with a brief look at the code. Thanks in advance.

@Mohammad , I installed the plugin from the kookma plugin library and I’m seeing all of the weekday names come up as “undefined”. When installing the plugin via drag and drop from the demo page, it works as expected though. I tested this with a fresh empty.html from TiddlyWiki.com and was able to reproduce the issue.

Pikaday works in range of now ± 10 (so now is 2022 you can choose 2012 up to 2032)
the due works for any date when manually set!

Hi @Tiddlybob
Confirmed. For now please use drag and drop method!
I will investigate this and push an update to KPL.

Thanks a lot @Mohammad ! As a frequent user of Projectify I really appreciate that its components are maintained, now that Nicolas has stopped the development.

Could be possible to have something like PikadayAndTime? Some of the events I put in my Projectify powered agendas are time sensitive and having a separate field for selecting the hour to be finished or to have a meting would be pretty convenient. So far I enter that by hand in another custom field.

TIA

Hi @Offray

I think you need

http://kixam.github.io/TW5-datePicker/

I am not a daily user of Projectify, but it is the best in the field.
TW-Pikaday is just a repack with minor wikitext modification. I did not modified the JS code.

1 Like

This is fixed now! See release 0.5.1

1 Like

Thank you, @Mohammad !

1 Like

Can this be made compatible with the Shiraz task manager so that it can be used together. Pikaday uses due field and Shiraz taks manger uses due-date field I guess. Can it be made same for both?

Yes, it is in my todo list!

2 Likes

The new update (Shiraz 2.5.2) supports both due and due-date fields.

1 Like