Datepicker - how to enable

lenkkivihko - February 14, 2009 - 16:30

How to enable Datepicker to a text field?

I have installed jquery_ui and jquery_update and jquery_ui into the jquery_ui/jquery_ui (as told in README.txt)
I think what I am missing is to who to add appropriate .js files and .css files to the source code.
Then how to tell that the datepicker should be added to some field.

I would assume they need to be added to form_alter to the form?

Could anyone provide some directions / help?

Thanks in advance!

How you adding the field,

nevets - February 14, 2009 - 16:56

How you adding the field, with the Form API?

Did you figure this out???

jeff00seattle - May 7, 2009 - 18:20

Hi

Did you figure how to add a datepicker to a form item???

Thanks

Jeff in Seattle

Jeff in Seattle

enable

GiorgosK - September 29, 2009 - 11:12

enable http://drupal.org/project/jquery_ui
and use this code

<?php
jquery_ui_add
(array('ui.datepicker'));
drupal_add_js('$(document).ready(function(){$("#date").datepicker();});','inline');
drupal_add_css("sites/all/modules/jquery_ui/jquery.ui/themes/default/ui.datepicker.css");
?>

 
 

Drupal is a registered trademark of Dries Buytaert.