-
Notifications
You must be signed in to change notification settings - Fork 3.3k
added 'showTwoMonth' parameter #2346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
enable/disable if one or two month are displayed at custom daterangepicker
'showTwoMonth' should only be allowed for datePicker
|
This is a great addition. I also have this issue on mobile and want to limit it to a single calendar, but still with the date range functionality. |
hides all predefined ranges when the user selects custom range button default: false
Bug Fix: hideRangeWhenCustomFocus was not made at initialization
|
I was able to create a single calendar while still keeping the date range functionality by adding: linkedCalendars: false new DateRangePicker(dateRangePicker, {
startDate: new Date(),
endDate: new Date(),
parentEl: dateRangePicker.parentNode,
linkedCalendars: false
});And in the SCSS: .daterangepicker {
.drp-calendar.right {
display: none !important;
}
} |
|
The problem with your solution is that you lose the “next” button. |
Adding the 'before.show.daterangepicker' Trigger to change params like 'minDate' before rendering the calendar elements
|
Yes, that's true, sorry about that. Your solution also works! |

i had a problem specifically on mobile applications. the date picker with 2 months displayed went over the whole screen and was difficult to use. so i introduced a new parameter that only works with datepicker. 'showTwoMonth' is a boolean and is true by default. you can set it to false and only 1 month will be displayed.
if timepicker is activated this parameter has no effect