Created
November 20, 2020 08:25
-
-
Save tpaksu/a00ebe1c54e829f8552bbf550928f6ff to your computer and use it in GitHub Desktop.
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
// replace your start date instance onfirstselect event with this: | |
onfirstselect: function (instance, start) { | |
startDate = start.clone(); | |
startInstance.globals.startSelected = false; | |
startInstance.hideDropdown(); | |
endInstance.showDropdown(); | |
endInstance.setDisplayDate(start.clone()); | |
endInstance.config.minDate = startDate.clone(); | |
endInstance.config.startDate = startDate.clone(); | |
endInstance.config.endDate = null; | |
endInstance.globals.startSelected = true; | |
endInstance.globals.endSelected = false; | |
endInstance.globals.firstValueSelected = true; | |
if (endDate && startDate.isAfter(endDate)) { | |
[startDate, endDate] = [endDate, startDate]; | |
endInstance.config.endDate = endDate.clone(); | |
} | |
fillInputs(); | |
endInstance.updateHeader(); | |
endInstance.reDrawCells(); | |
endInstance.updateTimePickerDisplay(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment