arqex / arqex/react-datetime

Inaccurate years viewMode header

Open
#635 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
2k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

### 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](https://user-images.githubusercontent.com/13119618/57945712-928c0700-78a8-11e9-8410-51396d1a7bdb.png)
^ 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 )`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.