Displaying a calendar day selector using the Datepicker plugin
As you develop configuration interfaces for your plugins or meta boxes to associate data to custom post types, you may need users to enter dates in text fields. Instead of only relying on the user to correctly enter date information using simple text, a much more reliable data entry method is to use a pop-up calendar. This type of tool allows users to navigate through visual representations of each month and pick the desired date.
You should have access to a WordPress development environment.
How to do it...
Follow these steps to use the jQuery Datepicker script that is provided by default with WordPress to display a pop-up calendar to provide an easy way to select dates:
- Navigate to the WordPress
pluginsdirectory of your development installation.
- Create a new directory called
ch9-calendar-pickeralong with a subdirectory called
- Visit https://www.jqueryui.com/download and...