It's simple. Keep the jQuery code, but assign it a <div> instead of an input field.
Date: <div id="datepicker"></div> <script> $(function() { $("#datepicker").datepicker(); }); </script>
A functional example is on the jQuery UI webpage for the datepicker widget , and I also included it below.
$(function() { $("#datepicker").datepicker(); });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script> <div id="datepicker"></div>
Cᴏʀʏ Nov 15 '10 at 20:22 2010-11-15 20:22
source share