The Date project contains a module (date_popup.module) that implements a date_popup form element. date_popup.module for Drupal 6 defined the date_popup_load() function, but the function is not present in the version for Drupal 7 of the module, nor is it a Drupal core function.
What the function did was to include the necessary JavaScript files.
$path = drupal_get_path('module', 'date_popup');
if (module_exists('jquery_ui')) {
jquery_ui_add('ui.datepicker');
global $language;
if ($language->language != 'en') {
jquery_ui_add("i18n/ui.datepicker-{$language->language}");
}
}
if (variable_get('date_popup_timepicker', 'default') == 'default') {
drupal_add_js($path . '/lib/jquery.timeentry.pack.js');
}
The equivalent function present in the Drupal 7 version of the module is date_popup_add(), which contains the following code.
drupal_add_library('system', 'ui.datepicker');
drupal_add_library('date_popup', 'timeentry');
// Add the wvega-timepicker library if it's available.
$wvega_path = date_popup_get_wvega_path();
if ($wvega_path) {
drupal_add_js($wvega_path . '/jquery.timepicker.js');
drupal_add_css($wvega_path . '/jquery.timepicker.css');
}
That function is called from date_popup_element_process(), which is the #process function used from the date_popup form field. You could write a #process function containing code similar to the one executed from that function, and attach it to the form field to which you want to add the date picker.