Comments (4)
@tamazlykar, hello again. :)
I think that v4.3.0 will help to move 1 year back and forward.
Just pass { step: 12 }
to the previousMonthButton
and nextMonthButton
and it is ready to go.
from datepicker.
The role of next/previous month/year is to move offsetDate
.
I have an idea to allow configuring a step of next/previous month's prop-getters so users could do things like this:
...nextMonth(month, { step: 12 })
- it will be equal to moving offsetDate 1 year to the future.
A good point is to expose offsetDate
to help developers determine what offset is.
Also, as quick enhancement could be to accept offset in setNexMonth
, setPreviousMonth
actions.
from datepicker.
@Feshchenko, hello :)
Thank you so much. I tried and found some issue in behaviour.
I make some reproduction of the issue (this is your example with a configured step and minDate/maxDate).
To reproduce:
- select January
- See that the previous year button becomes disabled.
The same issue will be if you choose any month in the previous year (except a current one - February).
from datepicker.
The role of next/previous month/year is to move
offsetDate
.
I have an idea to allow configuring a step of next/previous month's prop-getters so users could do things like this:
...nextMonth(month, { step: 12 })
- it will be equal to moving offsetDate 1 year to the future.
A good point is to exposeoffsetDate
to help developers determine what offset is.
Also, as quick enhancement could be to accept offset insetNexMonth
,setPreviousMonth
actions.
@Feshchenko Thank you for you contributions. It would be nice if this information is more clearly stated in the repo documentation and would be much more appreciated if this is also updated in the code sandbox examples.
from datepicker.
Related Issues (20)
- Why not aria-select=true on the selected dates? HOT 4
- WeekPicker HOT 3
- Key values are invalid in example HOT 3
- Accessibility HOT 3
- Default selected time is outside of the enabled range HOT 1
- Keep the time when selecting a different day HOT 1
- useTime Performance HOT 4
- Features Missing according to documentation. Please update documentation and examples. HOT 2
- nextMonthButton and previousMonthButton are missing from prop getters HOT 2
- Start of Years HOT 5
- How to change years independently for only one calendar HOT 2
- Problem with maxDate and month view HOT 2
- Contributing HOT 1
- Add Keyboard navigation. HOT 2
- Selecting time with set_focus_date HOT 5
- Limiting the choice of months by minDate HOT 1
- Date Range Issues HOT 7
- Give an option to set start date as empty as well HOT 2
- Strange behavior of the time picker (time duplication) when you select March 31 and then March 30 HOT 1
- Documentation error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datepicker.