Hi Marc and Rouslan,

The problem there is that the datepickers/timepickers are attached to
all relevant fields on page-load by functions.js, however in AJAX mode
the fields are created after page-load and the pickers are not attached,
so it's necessary to bind them manually after showing the dialog to the
user. My code for this looks like this (the snipped is simplified for
clarity):

---SNIP---
/**
 * Display the dialog to the user
 */
RTE.$ajaxDialog = $('<div>' + data.message + '</div>').dialog(options);
RTE.$ajaxDialog.find('.datefield, .datetimefield').each(function () {
   PMA_addDatepicker($(this));
});
---SNIP---


These information were very helpful for me. 

I went through you logic and modified my code for insert dialog and now the date pickers are working correctly. I pushed my changes to the repo. Please check that. 

Regards,
Thilanka. 

--
L G Thilanka Kaushalya     
Computer Science & Engineering,    
University of Moratuwa,
Sri Lanka
                          
Connect with me at,
      Gmail        : lgtkaushalya@gmail.com
      Twitter       : @thilanka_k
      Facebook  : Thilanka Kaushalya
      Yahoo       : lgtkaushalya@yahoo.com
      Blog          : http://coders-view.blogspot.com/