Skip to content

When using the date picker, the date I select gets reported one day earlier #169

Open

Description

@kennethmgreen17

At title says, my template works as expected except for the date picker. If I use the calendar pop-up and select 24 June, when the template is created the date displays 23 June. Same behavior if I type the date in or select from UI calendar. Even if I select "Today" the note that gets created shows yesterday's date.

Any idea why this is happening? Locale or time zone issue? I've using various times for the tests, and the times are displayed correctly.

I am fairly certain my computer clock and the date on my watch are not one day ahead. ;)

(edit to add below)

Joplin 3.6.15 (prod, win32)

Device: win32, 13th Gen Intel(R) Core(TM) i7-1365U
Client ID: 03555af1ab4f4dc7839518afacd8dbb1
Sync Version: 3
Profile Version: 49
Keychain Supported: Yes
Alternative instance ID: -
Sync target: Joplin Cloud
Editor: Markdown

Revision: c615726

Backup: 1.5.1
Favorites 2: 1.6.0
Freehand Drawing: 4.3.0
History Panel: 1.0.4
Inline TODO: 2.1.1
Menu items, Shortcuts, Toolbar icons: 1.1.0
Note overview: 1.7.1
Note Tabs: 1.4.0
Outline: 1.5.15
Persistent Editor Layout: 2.2.0
Quick Links: 1.3.2
Secure Notes: 2.2.6
Tagging: 1.0.3
Templates: 3.0.0

Activity

  1. kennethmgreen17 commented on Jul 7, 2026

    @kennethmgreen17
    Author

    This is puzzling. I have tried many combinations of this idea:
    '{{session_date delta_days=1 format "YYYY-MM-DD"}}

    But it doesn't appear I can make date calculations on the fly for a template.

    I can calculate for tomorrow (Tomorrow: {{datetime delta_days=1 format="YYYY-MM-DD"}} ) but I can't seem to figure out how to do the same for my own var (session_date)

    Am I missing something? Or is what I'm trying to do even possible?

    Thanks.

  2. kennethmgreen17 commented on Jul 8, 2026

    @kennethmgreen17
    Author

    I don't understand. Does anyone have any idea what might be happening? I cannot imagine this is just an acceptable bug of the calendar picker widget. Don't people using templates plugin use the date picker?

    For now, I'm doing a kludgy workaround:

    • session_yr: dropdown(2026)
    • session_mm: dropdown(01,02,03,04,05,06,07,08,09,10,11,12)
    • session_dd: dropdown(01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)

    This at least gets me the correct date. Thankfully, the drop-down widget allows typing in values, so I can tab past year and enter the date using the keyboard, so it's a workable solution.

    Still, I wish I knew what I was doing wrong with the calendar picker. And is there no way to make date calculations on custom variables? Maybe I'm setting up the script incorrectly?

  3. kennethmgreen17 commented on Jul 10, 2026

    @kennethmgreen17
    Author

    Thank you for letting me know I wasn't crazy! At least I know it's an actual problem with the date picker.

    I thought about your method of simply remembering to add a day to everything, but I don't trust that I won't make errors, and for certain notes, I need to have the correct date. My clumsy method above (setting year, month, and date as separate strings using dropdowns) actually works pretty well for me. Because the UI allows me to tab past year, and enter month and day with the keyboard (don't have to use the drop down), it doesn't slow me down that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions