Created
August 31, 2013 13:57
-
-
Save steffenr/6398380 to your computer and use it in GitHub Desktop.
Depending to-date with jQuery datepicker
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
(function($) { | |
Drupal.behaviors.date_popup_custom = {}; | |
Drupal.behaviors.date_popup_custom.attach = function(context, settings) { | |
// Add departure date same as arrival date | |
$('.form-item-d-departure-date').find('input').click(function() { | |
var arrival_date = $('.form-item-d-arrival-date').find('input').val(); | |
$('.form-item-d-departure-date').find('input').datepicker( "setDate" , arrival_date ); | |
}); | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment