added 'showTwoMonth' parameter#2346
Open
Eventpicker wants to merge 6 commits intodangrossman:masterfrom
Open
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;
}
} |
Author
|
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
Author
|
Yes, that's true, sorry about that. Your solution also works! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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