Last active
October 18, 2021 04:19
-
-
Save ash-f/b2dd78f5d3e249197e1c1e87e054522c to your computer and use it in GitHub Desktop.
WP Fluent Forms date field advanced date configuration for changing default datepicker date
This file contains 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
/* Enter this configuration to Advanced Date Configuration of Date field. change 01/01/1950 to any date. the date is US format. */ | |
{ | |
onOpen: [function(selectedDates, dateStr, instance){ | |
if (dateStr == '') { | |
instance.jumpToDate('01/01/1950', false); | |
} | |
}], | |
/* Set minimum age.(= 18) delete if you don't limit the age */ | |
maxDate: (new Date().getMonth() + 1) + "/" + new Date().getDate() + "/" + (new Date().getFullYear() - 18) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment