This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

Custom search date fields in CiviCRM 3.1

Skip to end of metadata
Go to start of metadata

This page refers to outdated version of CiviCRM. Check current version of documentation.


Documentation Search


CiviCRM 3.2 Documentation

Support and Participation

Developer Resources


CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

Date fields in 3.1

With the introduction of the new datepicker, the old date selection drop downs need updating. Use this guide to upgrade your code to use the new datepicker.


Adding the field to the form

In buildForm(), whereever you used to have the following code:

replace it with



Using the selected date

In where(), whereever you used to have the following code:

replace it with



Displaying the datepicker

In your template (.tpl) file, where you currently have

replace it with

Labels
  • None

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.