当我选择datepicker字段时,不会发生任何事情。
这是该字段的代码:
<input id="sticky_date" name="sticky_date" class="datepicker hasDatepicker" type="text">
javascriptjQuery(function() {
jQuery( \'.datepicker\' ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-100:-10"
});
});
包含代码add_action(\'admin_head\', \'admin_datepicker\');
function admin_datepicker() {
wp_register_script(
\'pub-datepicker\',
get_template_directory_uri().\'/js/datepicker.js\',
array( \'jquery-ui-core\', \'jquery-ui-datepicker\' ),
false,
true
);
wp_enqueue_script(\'pub-datepicker\');
}
我不确定我是否遗漏了什么,js控制台上没有错误,什么都没有发生