jQuery UI & Datepicker: Basic datepicker

This entry is part 1 of 14 in the series jQuery UI Datepicker

jQuery UI Datepicker – Default functionality

The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay.

Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close.

If a date is chosen, feedback is shown as the input’s value.

<!doctype html>
<html lang='en'>
    <meta charset='utf-8'>
    <title>jQuery UI Datepicker - Default functionality</title>
    <link rel='stylesheet' href='//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css'>
    <script src='//code.jquery.com/jquery-1.10.2.js'></script>
    <script src='//code.jquery.com/ui/1.10.4/jquery-ui.js'></script>
    <link rel='stylesheet' href='http://codecrawl.com/code/jqueryui/jqueryui_style.css'>
        $(function () {

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

Try The Code Datepicker Widgets API Doc
Series Navigation
jQuery UI & Datepicker: Show the week of the year >>

Leave a comment

Leave a Reply