Allow for monthsShown to be either next or previous to selected, or to default before maxDate.
See original GitHub issueExpected behavior
When I use monthsShown={2}
and maxDate={today}
, I would like to be shown current month and previous month
Actual behavior
Current month and next month are shown.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:6
Top Results From Across the Web
react-datepicker, issue with monthsShown by default
the default months shown is controlled by monthsShown datepicker component property. when we say 2- it shows Current Month + Next Month. I...
Read more >Datepicker Widget - jQuery UI API Documentation
By default, the datepicker calendar opens in a small overlay when the associated text ... ui-datepicker-prev : The control used to select previous...
Read more >Date slider to automatically update to the max date
I am currently on tableau 10.3.2 and i am wondering if there is a way to automatically update the dates on the date...
Read more >jQuery UI Datepicker
By default, the datepicker calendar opens in a small overlay onFocus and closes ... This allows one date format to be shown to...
Read more >DatepickerOptions | PrimeFaces JavaScript API Docs
This allows one date format to be shown to the user for selection purposes ... The function is called for each day in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d rather just have it be based on what integer is passed to
monthsShown
. We’d need to add support for negative integer and 0 becomes the ‘current’ month. By default it would include 0-n where n is the number provided, but you could also provide an array tuple (array of two integers) to explicitly define exactly which month range to show.Some examples
monthsShown={0}
- default, show the current monthmonthsShown={1}
- show the current month and next monthmonthsShown={-1}
- show the current month and previous monthmonthsShown={[1,2]}
- show the next month and the month after thatmonthsShown={[-2,-1]}
- show two months ago and the previous monthmonthsShown={[-1,1]}
- show previous, current and next monthJust an idea!!
when using this flag with monthsShown and selectsRange, on Date select I am going to the previous month. is there any feasible solution