First, you will have to create a preset.
* In the jQueryAdmin Backend (Admin-Tools -> jQueryAdmin v2.x), insert a name of your choice into the "New Preset" input field
* In the "UI Components" list, mark "Datepicker"
* Save the preset
Now as you have a preset, you will have to include it into your page. This can be done using the [[jQueryInclude]] Droplet. So, on your page, insert into a WYSIWYG-Section:
[[jQueryInclude?preset=<your preset>]]
Replace <your preset> with the preset name you chose above.
Now you have created a preset and included it into your page, it's time to make use of it. Simply add the
id="datepicker" attribute to the form field you wish to use with the Datepicker component.
For more options, see the Datepicker page:
http://jqueryui.com/demos/datepicker/For custom options, you'll need jQueryAdmin v2.1 (Beta available
here) to insert custom code into your preset. For older versions, use the Addon File Editor to customize your preset.
Example: To tie the Datepicker to all form elements with class "date", add the following code to your preset:
<!-- custom -->
$('.date').datepicker();
<!-- end custom -->
The complete preset contents after this change may look like this (of course, there may be more code if you added more components/plugins):
<!-- position: body -->
<script type="text/javascript">
$(document).ready( function () {
$("#datepicker").datepicker();
<!-- custom -->
$('.date').datepicker();
<!-- end custom -->
});
</script>