Nothing happens when I select the datepicker field.
This is the code for the field:
<input id="sticky_date" name="sticky_date" class="datepicker hasDatepicker" type="text">
The javascript
jQuery(function() {
jQuery( '.datepicker' ).datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-100:-10"
});
});
The include code
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');
}
I'm not really sure if I'm missing something, there's no error on the js console, nothing happens