Programming Tips - jQuery: use datepicker plugin

Date: 2009apr21 Language: javaScript Warning: html5 has <input type=date ...> Keywords: date, pick, picker Q. jQuery: use datepicker plugin A. Here's a compact example:
<form> <input id=date name=date size=10 readonly=readonly> <!-- Use readonly so the user can not type the data but clicking will make a popup --> </form> <script src=js/jquery.js></script> <script src=js/ui.core.js></script> <script src=js/ui.datepicker.js></script> <link rel=stylesheet href=css/ui.all.css type=text/css> <script type="text/javaScript"> $(document).ready(function() { $('#date').datepicker({ dateFormat: 'yy-mm-dd' }); }); </script>
A second example. You can use <span> instead of <input type=text> like this:
<span id=date>Select a date</span>