WordPress Plugin DatePicker

So the datepicker is working fine in back-end (admin menu) but when I paste on template home page (index) the datepicker not loading up and not working.

function enqueue_page_script_libraries(){
wp_enqueue_script(‘jquery-ui-datepicker’);
wp_enqueue_script(‘jquery-3-4-1’, ‘https://code.jquery.com/jquery-3.4.1.js’);
wp_enqueue_style(‘jquery-ui-css’, ‘https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css’);
}

add_action(‘admin_enqueue_scripts’, ‘enqueue_page_script_libraries’);
add_action(‘wp_enqueue_scripts’, ‘enqueue_page_script_libraries’);

function enqueue_page_scripts(){
wp_enqueue_script(‘phobs-jquery’, plugins_url(‘js/phobs_jquery.js’, __FILE__));
}

add_action(‘admin_enqueue_scripts’, ‘enqueue_page_scripts’);
add_action(‘wp_enqueue_scripts’, ‘enqueue_page_scripts’);

?>

This is the libraries I use above

Read more here:: WordPress Plugin DatePicker

Leave a Reply

Your email address will not be published. Required fields are marked *