Last active
May 31, 2023 15:13
-
-
Save coulterpeterson/821404a8d923f4b66bef163efb5c62d5 to your computer and use it in GitHub Desktop.
Allow Selecting Days From Another Month in Datepicker | Gravity Forms
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
/** | |
* Gravity Wiz // Gravity Forms // Allow Selecting Days From Another Month in Datepicker | |
* https://gravitywiz.com/ | |
* | |
* Allow days from other months to be selectable in the calendar view. | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet with our free Custom JavaScript plugin. | |
* https://gravitywiz.com/gravity-forms-custom-javascript/ | |
* | |
* Limitations: | |
* | |
* Only works with inline date picker right now. | |
* | |
*/ | |
// When the page is ready | |
window.addEventListener('load', function () { | |
if (document.querySelector('body') !== null) { | |
jQuery("[id^=datepicker_GFFORMID_]").datepicker( "option", "showOtherMonths", true ); | |
jQuery("[id^=datepicker_GFFORMID_]").datepicker( "option", "selectOtherMonths", true ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment