Forums

[resolved] Want date picker at template (7 posts)

  1. CsoftAdmin
    Member
    Posted 1 year ago #

    Hi,

    I want date picker at template for the user can pick any date he/she want.

    Is there any function available in wordpress? or I have to download specific plugin to use is at template page.

    Any help would be great.

    Cheers!!!

  2. CsoftAdmin
    Member
    Posted 1 year ago #

    I try to add jquery datepicker at my page.php. But It cannot show me the date picker at all neither any error.

    Can anybody tell me how I configure this?

    Please I really need that one.

  3. CsoftAdmin
    Member
    Posted 1 year ago #

    <?php
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-ui-core');
    wp_enqueue_script('jquery-ui-datepicker',  FILE_URL . 'jquery.ui.datepicker.js', array('jquery','jquery-ui-core') );
    ?>
    <script>
    
    	jQuery(document).ready(function()
    
    	{
    
    		jQuery("#dp2").datepicker();
    
    	});
    
    </script>
    <div id="dp2"></div>

    in page.php... but no luck.

  4. 123milliseconds
    Member
    Posted 1 year ago #

    did you use detailed info at http://jqueryui.com/demos/datepicker/

  5. CsoftAdmin
    Member
    Posted 1 year ago #

    I don't get what you want me to do? Please specify if I made any mistake.

    Thanks 123milliseconds.

  6. 123milliseconds
    Member
    Posted 1 year ago #

    If you had Firefox Firebug you would be able to see if all required js got loaded

    <p>Date: <input id="datepicker" type="text"></p>

    need to be an input field; you have a div

  7. CsoftAdmin
    Member
    Posted 1 year ago #

    Thanks a lot. I made the mistake. Now its working.

    Hurreeey

Topic Closed

This topic has been closed to new replies.

About this Topic