Created
July 24, 2013 18:41
-
-
Save ryanurban/6073260 to your computer and use it in GitHub Desktop.
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
// Customize Events Community Datepicker | |
if($("div.tribe-community-events-date input.datepicker").length) { | |
var datepickerOpts = { | |
dateFormat: 'yy-mm-dd', | |
changeMonth: true, | |
changeYear: true, | |
onSelect: function(selectedDate) { | |
var option = this.id == "EventStartDate" ? "minDate" : "maxDate"; | |
var instance = $(this).data("datepicker"); | |
var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings); | |
dates.not(this).not('#recurrence_end').datepicker("option", option, date); | |
} | |
} | |
var dates = $("div.tribe-community-events-date input.custom-datepicker").datepicker(datepickerOpts); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment