react-datetime icon indicating copy to clipboard operation
react-datetime copied to clipboard

Inaccurate years viewMode header

Open Pjohnsonator opened this issue 6 years ago • 3 comments

I'm Submitting a

[x] Bug report
[ ] Feature request
[ ] Support request

Steps to Reproduce

Open the datetime component to the years view

Screen Shot 2019-05-17 at 1 12 46 PM ^ From the codepen example

Expected Results

The .rdtSwitch header reflects the year range of the .rdtYear table cells below

Actual Results

The .rdtSwitch header reflects the year range of the decade, but the year range is [decade-1, decade+1]. e.g. 2010-2019 header with year options 2009-2020

Other Information

One solution could be changing YearsView.js ln 14 year + '-' + ( year + 9 ) to year-1 + '-' + ( year + 10 )

Pjohnsonator avatar May 17 '19 17:05 Pjohnsonator

Same issue on react-datetime version 2.16.3.

jandominik avatar Jul 09 '19 16:07 jandominik

Keeps happening!

arqex avatar Sep 20 '20 14:09 arqex

Keeps happening!

I have created a PR to fix this issue. Please check and merge if the changes are fine. PR

Sabarish-Vasudevan avatar May 04 '21 08:05 Sabarish-Vasudevan