longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

Feature Request - Previous Year and Next Year toggles #340

Open jpeacock76179 opened 7 years ago

jpeacock76179 commented 7 years ago

Nice plugin! Would be nice to have similar to the Prev Month and Next Month toggles.

Thanks

jonathanarbely commented 7 years ago

This is already implemented. In the config, add:

{
    showShortcuts: true,
    shortcuts :
    {
        'next': ['year']
    }
}

See "Use future date shortcuts:" at the documentation.

Iworb commented 7 years ago

I think he meant not selection, but navigation. If I have to set range like '2012-06-05' - '2012-06-08' I have to navigate monthly ~60 times on each tab untill I reach 'June 2012'. So how about a separate month and year navigation? In this case I could change year and month separately.

holtkamp commented 7 years ago

Seems like a useful feature indeed. When using the default presentation, something like:

A Pull Request would be much appreciated. I really lack the time to work on such new features and merely monitor this project a bit, since @longbill also has very little time...

snake-345 commented 6 years ago

@holtkamp https://github.com/longbill/jquery-date-range-picker/pull/367 what about that?)