vis-timeline icon indicating copy to clipboard operation
vis-timeline copied to clipboard

[Feature request] Option to set end date as "to end of day"

Open Archenoth opened this issue 3 years ago • 0 comments

Heyas all!

I've been trying to use vis-timeline to create something that deals with invoicing, which typically involves inclusive date ranges, which means ranges are in a format like "January 1 -> January 31", then "February 1 -> February 28", etc... These ranges have no concept of hours in a day, just that the ranges include the full days on either end

vis-timeline almost works perfectly for what I've been doing, except for one tiiiiny little thing! There doesn't seem to be an option to make date ranges dealing with days (So, with no hour information) inclusive, so it will render gaps between these periods A screenshot of a vis timeline with a gap between the last day of the month and the next month

I realize I could force it to render this way by adding a day myself, or putting " 23:59:59" at the end of the days, but that's not the information I want to render in any of the texboxes, in the tooltip when dragging, or when I post this data to the application, meaning I would need to convert between "a date that renders correctly", and "the date I actually want and mean" with every interaction between the two things, when the only change I actually want is just visual

So if there was a formatting option that would let the end date render as 1 day in the future without having to change all of the dates under the hood (Something like rangeFormat: 'inclusive' maybe?), that would mean that inclusive ranges like this would be significantly less difficult to pull off!

I hope this isn't a huge ask! I've just been staring down the barrel of reimplementing the two-way data binding in every location I want to use it, and I figured that asking would probably save me quite a few hours I would usually be fighting with a strictly visual change that the people I'm implementing this for wouldn't be able to accept

Thank youuu! And sorry for the novella above, but I hope the extra context helps~

Archenoth avatar Jun 20 '22 22:06 Archenoth