ИМХО, такую штуку на MODX нет смысла делать.
Больше подойдет Друпал, Битрикс, или фреймворк какой-либо.
/* Remove the calendar from the page */
remove: function(dp){
dp.active = false;
/* if (window.opera) dp.container.empty();
else */if (dp.container) dp.container.remove();
dp.calendar = false;
dp.container = false;
$$('select.dp_hide').removeClass('dp_hide');
}MODX Evolution had been sanitizing global GPC (GET/POST/Cookie or Request) variables in a way that allowed any Snippet within MODX that echoed user input (i.e. a website form field) from the GPC variables back to the output (for display) to inadvertently execute the MODX tags provided in the input field.
*Remote script execution requires specific configurations of add-ons included in the core.
antonkuzmin