It looks like they are using 'afterShowForm' to attach a date/color picker to a div.
(view source)
jQuery("#list").navGrid("#pager",{edit:true,add:true,del:true},
{width:400,height:400,closeAfterEdit:true,
afterShowForm:function(){ $("#jsrs").load("/demo/apples/jsrs"); },
onclickSubmit:function() { $("#jsrs").empty(); }
},
(view source)
http://www.the-di-lab.com/demo/apples/jsrs
//Js for colorPicker
$('#color').ColorPicker({
onSubmit: function(hsb, hex, rgb) {
$('#color').val("#"+hex);
},
onBeforeShow: function () {
$(this).ColorPickerSetColor(this.value);
}
}).bind('keyup', function(){
$(this).ColorPickerSetColor(this.value);
});
//Js for datePicker
$('#date').DatePicker({
format:'Y-m-d',
date: $('#date').val(),
current: $('#date').val(),
starts: 1,
position: 'bottom',
onBeforeShow: function(){
$('#date').DatePickerSetDate($('#date').val(), true);
},
onChange: function(formated, dates){
$('#date').val(formated);
}
});
Thanks for finding this example, I was looking for how to do this as well.