autosubmit method

This commit is contained in:
vitalets
2012-11-30 18:48:42 +04:00
parent 49d795bf0d
commit ed836c2271
6 changed files with 64 additions and 20 deletions

View File

@@ -95,7 +95,16 @@ $(function(){
clear: function() {
this.$input.data('datepicker').date = null;
this.$input.find('.active').removeClass('active');
}
},
autosubmit: function() {
this.$input.on('changeDate', function(e){
var $form = $(this).closest('form');
setTimeout(function() {
$form.submit();
}, 200);
});
}
});