I need to have a click to edit element on a page, that will in turn invoke an instance of the jQuery UI Datepicker.
Currently, I\'m using JEditable to provide the i
Here is my solution. I use custom date format and on datepicker close, I reset the input form and apply cssdecoration (my jeditable improvement). Working with jQuery UI 1.5.2
$.editable.addInputType('datepicker', {
element : function(settings, original) {
var input = $('');
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').datepicker({
firstDay: 1,
dateFormat: 'dd/mm/yy',
closeText: 'X',
onSelect: function(dateText) { $(this).hide(); $(form).trigger("submit"); },
onClose: function(dateText) {
original.reset.apply(form, [settings, original]);
$(original).addClass( settings.cssdecoration );
},
});
}});