/home/mip/mip/public/vendor/datatables/jquery.jeditable.datepicker.js
$.editable.addInputType('masked', {
element : function(settings, original) {
/* Create an input. Mask it using masked input plugin. Settings */
/* for mask can be passed with Jeditable settings hash. */
var input = $('<input />').inputmask(settings.mask);
$(this).append(input);
return(input);
}
});
$.editable.addInputType('datepicker', {
element : function(settings, original) {
var input = $('<input class="form-control input-sm">');
//if (settings.width != 'none') { input.width(settings.width); }
//if (settings.height != 'none') { input.height(settings.height); }
input.attr('autocomplete','off');
$(this).append(input);
return(input);
},
plugin : function(settings, original) {
/* Workaround for missing parentNode in IE */
var form = this;
settings.onblur = 'ignore';
$(this).find('input').inputmask({'alias': settings.mask}).datepicker({changeYear: true, changeMonth: true}).bind('click', function() {
$(this).datepicker('show');
return false;
}).bind('dateSelected', function(e, selectedDate, $td) {
$(form).submit();
return false;
});
}
});