go-vikunja / vikunja

Mirror of vikunja from https://code.vikunja.io/api
GNU Affero General Public License v3.0
758 stars 55 forks source link

Date picker current date incorrect if page was not refreshed in browser today #251

Open filcuk opened 2 months ago

filcuk commented 2 months ago

Description

To reproduce:

  1. Load Vikunja on day 1
  2. Return to the page on day 2
  3. You can navigate around, switch projects, complete tasks
  4. When you open a date picker (for example setting a due date), day 1 will be defaulted to and marked as 'current' date

Vikunja Version

v0.23.0

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

kolaente commented 2 months ago

I'm unable to reproduce this. Can you clarify the third step a little more?

filcuk commented 2 months ago

Of course; what I meant by the 3rd step is that user can continue using Vikunja, but so long as the page isn't reloaded in browser, the 'today' date will not update. This can cause one to set incorrect due dates, if not careful.

To reproduce, you must not close browser or reload page. This, in my use case, is common by the tab being pinned (stays loaded) and the device hibernating between sessions (browser stays open for days).

This is on the latest Firefox. I would not expect it to be different elsewhere, but if this is unexpected behaviour, please let me know and I'll test further.

kolaente commented 2 months ago

Managed to reproduce it, but not reliably. Will look into a fix.

kolaente commented 4 weeks ago

I've looked into it and it seems like the problem is caused by flatpickr. Since the library is essentially unmaintained since two years, I'll migrate away from it in the short term, though not in time for the next release. Until then, this issue will stay open, just so that you know.