zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

[Enhancement] Negative value for Date type #1566

Closed QuentinLeCaignec closed 3 years ago

QuentinLeCaignec commented 3 years ago

(Version 0.45.8, on Kubuntu)

This is a fairly specific request and it depends a lot on how the Date type (for Label Definition attributes) is declared or how much it can be modified.

It would be useful to be able to set a Date value on year 0 and on a negative value (year -50000, etc..) in cases where the timeline is wide and includes prehistorical dates (BC). In my case I have a fictional fantasy timeline that requires a very wide date value from negative to positive.

Since the maximum positive right now is the year 275760 this looks to me like it's just the normal javascript date type, so hopefully the restriction on negative values is mostly a frontend/UI one.

Beyond that, i'm curious to see if some kind of timeline widget is possible to do with some JS.

zadam commented 3 years ago

Hi, I checked quickly and it seems like a chrome issue. Trilium uses native input date tag with no extra validation and chrome simply does not allow you to choose negative year. In this case I recommend to just use text type instead of date if negative years are important ...

QuentinLeCaignec commented 3 years ago

Oh interesting. Yes i've been using text for now, I thought about it because of a potential timeline graph/widget in JS, using proper dates would be useful for that but text will be fine.