Skip to content

Instantly share code, notes, and snippets.

@yooodooo
Created March 13, 2013 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yooodooo/5149746 to your computer and use it in GitHub Desktop.
Save yooodooo/5149746 to your computer and use it in GitHub Desktop.
easyui add editor for my97 datePicker
$.extend($.fn.datagrid.defaults.editors, {
my97 : {
init : function(container, options) {
var input = $('<input class="Wdate" onclick="WdatePicker({dateFmt:\'yyyy-MM-dd\',readOnly:true});" />').appendTo(container);
return input;
},
getValue : function(target) {
return $(target).val();
},
setValue : function(target, value) {
$(target).val(value);
},
resize : function(target, width) {
var input = $(target);
if ($.boxModel == true) {
input.width(width - (input.outerWidth() - input.width()));
} else {
input.width(width);
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment