Support » Plugin: WP Datepicker » Plugin not working

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    You are using jQuery datepicker independently as well, i found datepicker script other than my plugin. Please use one at a time, no need to include date picker JS file and script again and again.

    Have a look here
    http://image.prntscr.com/image/01c69cd2e4a049b2a10ba792ff0a75f4.png

    elzix

    (@elzix)

    What’s funny is that when I deactivate the plugin, all presence of jQuery datepicker disappears (both the independent and your’s). Could it be a WP 4.7 thing? Or another plugin detecting the use of function datepicker()?

    elzix

    (@elzix)

    I’ve been looking though your plugin and found:

    wp_enqueue_script(
    	'wpdp-scripts2',
    	plugins_url('js/scripts-front.js', dirname(__FILE__)),
    	array('jquery', 'jquery-ui-datepicker')
    );

    Doesn’t this function invoke WordPress’ jQuery datepicker as shown in
    http://image.prntscr.com/image/01c69cd2e4a049b2a10ba792ff0a75f4.png?

    aqibraza

    (@aqibraza)

    Hi Elzix,

    Try this on a plane WordPress installation. There is some plugin is conflicting with WP Datepicker plugin.

    Thanks,
    Aqib

    elzix

    (@elzix)

    Well, when your right, your right.. I tried using type=”date” and it worked.. then I tried deactivating the plugin and was still working.. then I tried removing all the classes and it’s still working.. There must be some unknown conflict, but at least it works for me..

    elzix

    (@elzix)

    Haha.. It was Chrome filling in the blank type=”date” for me.. Solution doesn’t work on Firefox.. Back to the drawing board..

    • This reply was modified 3 years ago by elzix.
    elzix

    (@elzix)

    OK, I think I have fixed it..

    The input that did not work was:
    <input type="text" id="datefrom" name="book_date_from" value="Check In" class="datepicker hasDatepicker">
    With plugin settings pointing to
    $('.datepicker').datepicker();

    The input that works is:
    <input type="text" id="datefrom" name="book_date_from" placeholder="Check In">
    With plugin settings pointing to
    $('#datefrom').datepicker();

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    I guess that your website was caching the files and even after deactivating the plugin, you were having the files enqueued. Normally whenever you encounter such compatibility issues so must try with default WordPress installation with twenty series. For example, twentyseventeen is the latest one. What i see in your implementation, “datepicker” and “hasDatepicker” classes were already applied to the input field. It was not a mistake or conflict. It was due to another script involved, did you notice in my first reply? Later you removed the other script i think and tried it with the ID “#datefrom”. I will again mention that whenever any plugin is not working in combination so try it alone in default settings environment. Accept my apology for late reply due to busy schedule.

    Thanks,
    Fahad

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin not working’ is closed to new replies.