jQuery Datepicker is included in WP Core, you can add it to your functions.php (for themes) or index.php (for plugins)
function styles_scripts() {
wp_enqueue_script('jquery-ui-datepicker');
// Enqueue some theme-roller or default style...
wp_enqueue_style('jquery-style','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
}
add_action( 'wp_enqueue_scripts', 'styles_scripts', 11 );
Than in the HTML part where you need the datepicker
<input type="text" id="MyDate" name="MyDate" value=""/>
And finally in your Javascript
jQuery(document).ready(function() {
jQuery('#MyDate').datepicker({
dateFormat : 'dd-mm-yy'
});
});
This code is not tested, I just typed it here and hope it work well, let me know if you need more information or correction.
Related Posts:
- How can I remove a hooked action created by a plugin?
- Twillio How To Send SMS for Custom Post Type
- Woocommerce category description as subtitle
- Custom values are not translated
- Upgrading WordPress 4.0 asks for FTP password
- Change the name of an installed plugin
- WP deregister, register and enqueue dequeue
- prefix table and plugins
- Duplicate a Multi-Site Subdomain
- why in my wordpress admin panel the membership option is not showing
- Add multiple attributes to product from php
- why shouldn’t i save metadata when its a revision
- wordpress.org codebase
- Function to prevent users from trashing comments
- Can’t get plugin settings page to save data
- Calling custom plugin class methods from a template
- WordPress takes too much time (100 seconds) to load – Front end and back end
- Integrating non-WooCommerce and WooCommerce Orders together [closed]
- Hook to plugins admin settings
- how to change the verification url of pie register plugin of wordpress?
- (WooCommerce) Remove Sidebar only on Single-Product page
- stack-overflow-like content ranking for wordpress?
- finding whether request is for post, and post id
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Masonry images not working
- How to block XML-RPC attack?
- Force language in translate function
- Using color picker in plugin, does input attribute order matter?
- Implementing an image hosting website using WordPress? [closed]
- WP-DownloadManager – Query most download per week/month etc
- How to test ‘upgrader_process_complete’ hook in plugin development?
- How to get path or root of plugin folder, not file or dir?
- How to prevent additional code in functions.php to be removed once there is an update?
- Displayed content disappears when adding attributes to shortcode
- Thesis 2 custom Page
- What is the easiest way to rename a plugin (and also avoid plugin updates)
- Display linked articles at the bottom of post (like related posts)
- register_activation_hook() not working as expected
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Running multiple security plugins
- Opening a JQuery modal window on click of a button with a JQuery plugin
- Is there a way to remove a tooltip of a plugin via custom CSS? [closed]
- Correct Plugin File Path
- strange shortcode error: does shortcodes requires any dependency?
- how to replace hostnames on certain external links?
- Custom PHP Page Using WordPress login
- Create “new pages” within the admin section of plugin
- How to completely hide a WordPress/BuddyPress Install? [closed]
- Facebook ‘Share’ and ‘Like’ on individual posts
- Creating teams of users in WordPress
- Share plugins, themes, and multi post in a multidomain network
- Removing the custom_image_header from wp_head
- Is it safe to use Web Invoice 2.1.0 without SSL?
- WordPress cron job running more than once
- How to properly replace the_content with the html in a php file?
- Is there a way to make [Table Of Content] plugin while not using revision data?
- How to Add text value in Automatically in this conditions?
- wordpress fcm plugin not working on scheduled posts correctly
- How to display emails as a post?
- Elementor: How to design Dropdown Select Box Navigation page like Chegg
- How to access a wordpress plugin page or add posts without doing it from the WordPress dashboard?
- Displaying all the images from all of my articles
- Problem with Date translation in WordPress
- Create new page in wordpress plugin which doesn’t exist
- Use WordPress Plugin without WP head
- install / update plugins remotely
- Why is my site still showing insecure icon even if I have SSL certificate?
- Forum creation with bbpress and front end
- Fatal error when activating my custom wordpress plugin
- Front End Page Not Loading Header Footer
- Media Upload to custom database and Custom Directory
- Nested DIV’s across functions in PHP, do not seem to work
- TinyMCE how to add css when inputing a text
- Add image to post
- How to move WordPress gallery image out of the link?
- get_option return incorrect values
- get recent 12 days post then random in wordpress
- Restore Category Base
- Problems with installing and deleting plugins
- private functions in plugins
- Is it possible Embed flexviewer in wordpress and how?
- Need to change contact email depending where user is from
- How to show an image popup when one clicks on an image thumbnail?
- Add page-link after post content. Before plugin
- What method should I use for a sidebar widget that reads latest posts?
- Include subtitle display to slideshow
- Woocommerce – Product Description heading [closed]
- wp doesn’t recognize my plugin if I don’t login as WP user (or as WP Admin)
- How to make wordpress backend mobile optimized.?
- Visual Composer Data Source?
- WP Offload S3 Lite “Please setup GD or ImageMagick” noticed
- Possible to add “Template” selector to pages? Is Any Plugins are There..?
- WordPress REST API filter on blank custom ACF
- How to change and edit users according to the extension in the URL
- How to add a static image inbetween the product tiles on main shoppage woocommerce?
- Plugin download link
- thumbnail_width not working in wordpress most popular post plugin
- Gravity Forms and Gravity View Permissions
- Admin Notice is only localized when displaying the “Plugins” Backend Page
- How to call a logging function from a generic utility plugin from another plguin