I am in the process of trying to learn all of this as well but Content_publish::entry_form() in system/expressionengine/controllers/cp/content_publish.php should give you a good idea how to load jquery ui libraries and custom javascript files from your themes directory.
Hope that helps.
for posterity, this is the code I used to add the datepicker JS
thanks to the guys at EE Garage guys for supplying it
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.