PHP Classes

Jquery Calendar Render: Render a date picker using jQuery calendar plugin

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 65%Total: 462 All time: 6,069 This week: 129Up
Version License PHP version Categories
jquery-date-picker 1Freeware5HTML, PHP 5, Time and Date


This is a simple class that can render a date picker using jQuery calendar plugin.

It outputs HTML and JavaScript code to display a form text input that will take a calendar date picked by the user using the jQuery Calendar plugin.

The name of the text form input and other properties are configurable.

Picture of Anthony Amolochitis
  Performance   Level  
Name: Anthony Amolochitis <contact>
Classes: 10 packages by
Country: United States United States
Age: 44
All time rank: 1138165 in United States United States
Week rank: 301 Up34 in United States United States Up


I need to pick a date and return it to a form
I require the date to return in MySQL/Oracle format

Appointment setting and callback program
Log phone calls and set appointment dates and times for leads

Datepicker compatible with single page AJAX PHP application
PHP date picker that posts date variable to MySQL



 * Description of DatePickerBuild
 * Use this class to render a text box that uses a jquery calendar.
 * It is assumed that the jquery libraries are already included in the html
 * includes section.
 * @author aamolochitis
class JqueryDatePickerBuildDefault
$name = '';
$boxProperties = '';
$boxValue = '' ;
     * Pass in parameters for the input box to have it name/id, styling, and value
     * @param string $name
     * @param string $boxProperties
     * @param string $boxValue
function __construct( $name , $boxProperties, $boxValue)
$this->name = $name ;
$this->boxProperties = $boxProperties ;
$this->boxValue = $boxValue ;
     * Return an input box that uses jquery calendar default functionality
     * @return string|null
function Render()
        if( empty(
$this->name ) ){ return null ;}
            $(function() {
                $( "#'
. $this->name .'" ).datepicker();
        <input type="text" id="'
. $this->name .'" name="'. $this->name .'" '. $this->boxProperties .' value="'. $this->boxValue .'">';

$name = 'name';
$style= ' style="height:35px; width:200px; font-size:12pt; border:none; color:grey; " ' ;
$curDate = date( 'm/d/Y') ;

$date = new JqueryDatePickerBuildDefault( $name , $style , $curDate );


<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="//">
  <script src=""></script>
  <script src=""></script>
    <fieldset style="border:1px solid lightgrey; border-radius: 4px; width:200px;">
        <legend style="border:1px solid lightgrey; border-radius: 4px; padding:4px; color:grey;">
            Pick A Date
        <?php echo $date->Render(); ?>

  Files folder image Files  
File Role Description
Plain text file ExampleUsage.php Example Example use of the class
Plain text file JqueryDatePickerBuildDefault.php Class Build basic usage of a jquery calendar

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,069
This week:129Up
User Ratings User Comments (1)
 All time
Nice little utility.
8 years ago (Richard Rowley)