Basic JS troubleshooting – strip it down to basics. Create a new script which either has a console.log('I am working')
or alert('I am working')
and enqueue it without any dependencies. If it works, enqueue it with your dependencies – still with your console or alert to easily check whether it’s working. If it works, now you can do a really simple function with the datepicker you really want to use in your script. Once that works, put in your more complex custom code.
Another common thing to check – what version of jQuery does your version of Datetimepicker require, and what is loading in your version of WP? Perhaps they’re not compatible.
Related Posts:
- Conditionally dequeue dependency of scripts
- How to enqueue default scripts with dependency?
- Enqueue registered dependencies only when necessary
- Set a parent script presence status true so that child scripts load in wordpress
- wp enqueue style on specific page templates
- How do I get the $handle for all enqueued scripts?
- Prevent Version URL Parameter (?ver=X.X.X) on Enqueued Styles & Scripts
- Register a script to be enqueued both in admin and front end
- Loading a script with a dependency, is unloading another script’s dependency
- wp enqueue script using scripts from cdn with a safety callback
- Can I add styles to footer with $wp_styles->add_data?
- Conditional wp_enqueue_script on a page
- Enqueue custom font file with rel=”preload”
- RequireJS in custom theme. Working Example
- Why is jquery-ui-core enqueueing in my footer instead of the header?
- jquery script not enqueued in child theme
- Get the list of enqueued/registered scripts for a specific post?
- Add script to footer – on post editor
- Which action to hook wp_enqueue_script to? wp_head or wp_enqueue_scripts? [duplicate]
- enqueue and localize script in footer
- What determines the order of enqueued styles?
- Wp_head and wp_footer vs wp_enqueue_script javascript files?
- Enqueue script only if page has an oembed
- How to use wp_enqueue_style() and wp_enqueue_script() only when needed?
- Preload key requests using wp_enqueue
- Don’t load scripts if on mobile/tablet
- How to Add a Custom Script to Customize.php
- Remove a script from a template file using wp_dequeue_script
- Child Theme – what is the scope of overwriting files?
- Enqueue scripts to footer
- Add last modified time as version to css and js
- Best spot for wp_register_script() and wp_register_style()
- Custom Plugin Development: What priority should wp_enqueue_scripts have?
- How to control the order of the combination of enqueued styles and scripts – site speed issue
- Register script/style: Is it possible to customize the version query string via plugin?
- scripts not enqueueing
- Asset loading with gulp.js or Grunt
- Enqueue AWS Script
- Dequeuing scripts for all pages but the home page
- Optimizing WordPress’s styles and scripts
- How do I enqueue a js file in functions.php for a if lt IE 9 statement? [duplicate]
- Which jQueryUI handles are predefined in wordpress?
- How to enqueue a style using wp_enqueue_scripts()?
- getting a js file for one page
- How do you enqueue a Visual Basic script using wp_enqueue_script?
- enqueue admin styling and scripts only on plugin page
- wp_enqueue_script called incorrectly
- Can’t see why my scripts aren’t loading when I register and enqueue them
- jquery-ui-autocomplete is not loaded with wp_enqueue_script
- WordPress script file version numbers changing in live environment
- Is It Possible to add JS AFTER the Enqueue within the same Function?
- How can I manually enqueue plugin scripts
- How can I properly enqueue wp-hooks without issues?
- wp_dequeue_style and wp_dequeue_script not working on server but does work on local xampp
- Can´t access child theme´s scripts dependencies found in parent
- wp enqueue, how to prevent duplication when same script is registered with different handles
- Localizing script to pass a value to a javascript function
- get_template_directory_uri not dependent on WP_HOME in wp-config.php?
- Dequeue script conditonnally
- why quotes shown in WordPress?
- Help to enqueue a js functions ( jquery) [closed]
- Conditionally load script depending on current admin page
- Enqueue script inside IE conditional comments
- How can I integrate Fancybox 3 in WordPress properly
- Enqueueing Scripts and Styles
- Enqueuing a script before anything else
- Should I use get_bloginfo(‘stylesheet_directory’) or get_stylesheet_directory_uri() when enqueueing my js files?
- How to load API’s in WordPress?
- Enqueue scripts based on options
- Adding Pinterest Script Before Closing Body Tag
- Enqueue Script in WordPress
- Plugin add_action and add_menu_page
- How Do I Enqueue a Script into 2 different Footers on the Same Site?
- how to load css and js based on post template
- link to JS library using wp_enqueue_scripts not working
- Using wp_enqueue_script on scripts that contain PHP
- Enqueue specific script on account creation (and never again)
- Proper enqueue for child theme functions.php
- loading javascript CDN with local fallback (not jQuery)
- How do I pass $in_foooter to wp_enqueue_script() without passing other params?
- Dynamic wp_enqueue_scripts?
- Why do I have to specify all parameters for wp_enqueue_script to load my jquery in the footer? [closed]
- Load scripts only for selected template
- How to do chunked JS files in WordPress?
- wp_enqueue_script error with `ID`, `post_title`, `post_name` of none object
- How to enqueue a script on a specific URL that contains multiple parts
- Enqueue Script only over specific WordPress core file
- i can’t handle any style or Js file on my theme . what is the problem of this file?
- ajax jquery live search box not working in wordpress plugin
- Dealing with multiple Google maps API calls
- How can I remove the site URL from enqueued scripts and styles?
- Initializing scripts in wordpress
- How to include a JS file in this theme?
- wp_enqueue_script was called incorrectly… i want to work with debug on
- Loop through arguments of a function
- wp_enqueue doesn’t load dependencies
- wp_enqueue_scripts hangs
- How to enqueue js script after another specific js script?
- comment-reply.js is not loading
- How can I specifically enqueue scripts for edit orders pages only