Pikaday Plugin: A Repack of Date Picker from Projectify

Hi @arunnbabu81, The advice from @EricShulman was " try using an explicit UTC format (i.e., [UTC]YYYY-0MM-0DD ) as the operand for the format:date[] filter."

But this is not a filter issue, at least not in any straightforward way; the problem is the date is displaying incorrectly – on the very same tiddler – as soon as I choose it (and move from edit to view mode).

This seems like something that ought to be fixable by something other than a personal workaround, since presumably somewhere near half of the people who use any given date-picker solution will be behind UTC.

In $:/plugins/kookma/shiraz/templates/body/due-date, there is the following macro definition:

\define showCell()
<$set tiddler=<<currentRecord>> field=<<currentColumn>> name=due-date>
<$text text={{{[<due-date>split[-]split[.]join[]format:date[YYYY.0MM.0DD]]}}} />
</$set>
\end

As per my previous guidance referenced by @arunnbabu81, adding [UTC] to the format:date filter operand will correct the problem. Thus:

\define showCell()
<$let fmt="[UTC]YYYY.0MM.0DD">
<$set tiddler=<<currentRecord>> field=<<currentColumn>> name=due-date>
<$text text={{{[<due-date>split[-]split[.]join[]format:date<fmt>]}}} />
</$set>
</$let>
\end

-e

1 Like

Thank you Eric. I patched the template and soon push a new release to include this.

@Springer
I was talking about Pikaday, as the thread is about Pikaday plugin. It seems you have the issue in Shiraz. By the way, if you install Pikaday into your wiki, then Shiraz will use it instead of browser date widget.

Heh, heh. It also happens to me as I have manage to learn as little JS as possble ;-P. I wonder how we could extend TW with non-JS languages. We have done a little bit of it in the back-end with TiddlyWikiPharo, but at some point we would need to explore having a language that transpiles to JS and hooks to TW to change/define UI and behavior. Umm… such exploration deserves its own thread in itself. Thanks for helping finding this “minimal starting experiment”.

I have come late to this thread but I would like to find or build a date picker that appears as only an icon, I can choose the date field, set up for any fieldname, and can save as tiddlywiki date serial numbers, optionally including time.

Further to my last reply/request, I am keen to use other date fields can I make a number of pickers for different date fields?

  • To do this I would also need to replace the current button label “schedule” with something else, this would also enable my prior request for “build a date picker that appears as only an icon”.
  • Supplying a different icon as well would be nice.

I will try an hack my way to these possibilities but if @Mohammad or others are more familiar with hacking this you may be able to give quicker answers.

Bump, I am looking again at this now

  • It seems it may be too hard to reengineer projectify’s date picker for other dates