Posted by Afn on December 18, 2006 at 9:16pm
How do I add a new flexinode or cck type that automatically uses the js.tools calendar popup?
It sounds like it would be simple to do. One for Date and Time, and One for Time only, if possible.
Regards,
Dave
Comments
I second the motion
I am very interested in the answer to this question.
In my case, dealing with Drupal 5.0 rc1.
I hacked the CCK Date module/plugin so that it would automatically use jscalendar, by adding the appropriate fields to the form element (as per instructions), plus some further hacking to solve problems occuring in another part.
I am going to make a test one of these days with a fresh installation, and post the details in the issue queue of the module (if no-one else has already done so); but if there are better instructions here, I would love to hear about it.
Haven't had time to check out the date-range module plugin for Drupal 5.0, either, which says it uses the plugin. Go to modules by name, and choose 5.x.
Victor Kane
http://awebfactory.com.ar
Victor Kane
http://awebfactory.com.ar
you could use form_alter and
you could use form_alter and just add the jscalendar class to the fields you want.
<?phphook_form_alter($form_id, &$form) {
if ($form_id == 'whatever') {
$form['whatever']['#attributes']['class'] = 'jscalendar';
}
}
?>
i did this on a recent project.
great idea
thanks!
Victor Kane
http://awebfactory.com.ar
I am new to Drupal
<?phphook_form_alter($form_id, &$form) {
if ($form_id == 'whatever') {
$form['whatever']['#attributes']['class'] = 'jscalendar';
}
}
?>
Where do you insert this code? in what module?
If I have a textbox that I want to use jscalendar with, on form "Flexinode-4", and the textbox is called "start_date" where do I put this code to enable the popup calendar?
Please help!
Thanks!