Hot answers tagged

12 votes
Accepted

How do I open a case that started more than twenty years ago?

Yes, you can expand this range in Administer > Customize Data and Screens > Date Preferences. Change the start Offset of activityDateTime class to 30.
user avatar
6 votes
Accepted

Searching/filtering by the date a contact was added to a group

I have a report for this on Github. EDIT: Ignore comments below; this report works on modern versions of CiviCRM, and Laryn's improvements are now part of my extension.
user avatar
6 votes

How to change the date format for the receipt date in a template

If you want 28 February 2019 {foreach from=$contributions item=contribution} {assign var="date" value=$contribution.receive_date|date_format:"%d %B %Y"} If you want 28 02 2019 {foreach from=$...
user avatar
  • 2,252
5 votes
Accepted

How to use Smart Groups with relative dates?

This was a bug in Core CiviCRM which is now fixed starting from version 4.7.14.
user avatar
  • 992
5 votes
Accepted

Smart Group relative date criteria not saving

I recall we've experienced this for quite a number of fields in Advanced Search. Some of them are - Event Dates, Registration Dates and some date filters in Case section. I did a patch to fix this ...
user avatar
5 votes

Default value for custom date field

/** * Implements hook_civicrm_buildForm(). * * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_buildForm * */ function extensionname_civicrm_buildForm($formName, $form) { ...
user avatar
4 votes
Accepted

Exported custom date fields formatted incorrectly

Based on your description, I think the export format might be controlled by the "Complete Date and Time" and "Complete Date" settings at Administer > Localization > Date Formats. The default values ...
user avatar
4 votes

Setting default date value via civicrm_buildForm hook no longer displays date

I think the date widget have its default value based on the format it is being set. Eg - For mm/dd/yyyy input format set in Administer -> Localization -> Date Formats. This works - function ...
user avatar
4 votes

Why has entering a date changed in 4.7.16? Can it be reverted?

There was an issue due to some refactoring around the handling of date fields to try to standardise them. This lead to a problem most notably in birth date fields in 4.7.16 but i'm guessing can be ...
user avatar
  • 1,279
4 votes
Accepted

How to create a Drupal View that calculates activity end time by duration

The template file is just to change how this one field is displayed. Create a view of civicrm activities. Add the Scheduled Activity Date field three times. First to display the date. Second to ...
user avatar
  • 1,811
4 votes
Accepted

Date of birth -- months only show through September

The choice of months is restricted because the date-picker does not allow future dates to be chosen for the birth date field. First select a year in the past. Then you will see all months available ...
user avatar
  • 3,148
4 votes
Accepted

Custom date field formatting with smarty

Found the answer. The civi field token must be captured to a Smarty variable first: {capture assign=arr}{contact.custom_105}{/capture}{$arr|date_format:"%A, %B %e, %Y"}
user avatar
4 votes
Accepted

Edit birth date

Assuming you have a default layout, then there is a Date of Birth field on a contact's summary tab.
user avatar
  • 10.8k
4 votes

Event on several different days

I don't think what you need is possible using the built-in iCal feed and a single event - not without writing an extension. However, perhaps @petednz-fuzion can chime in on the status of his yet-to-be-...
user avatar
3 votes
Accepted

Gift Aid Declarations with overlapping dates

The short answer is 'No' there aren't any settings to allow this. Gift Aid declarations don't have to have an end date, when you sign up to Gift Aid to an organisation you can effectively sign up for ...
user avatar
  • 4,244
3 votes

How to set custom relative date filters

So I think I was jumping the gun with my excitement about this. I found the issue on Jira, which has been updated to say the custom filter creation has been bumped to 4.8. The work-in-progress code ...
user avatar
  • 7,337
3 votes
Accepted

How to show Days in Case in Drupal Views?

Got it! In Drupal added the Unix Timestamp format: Administration/Regional and Language/Formats/Add Format. For the string I put in U. Added the Date Type Unix Timestamp In the View: Added the Start ...
user avatar
  • 1,811
3 votes
Accepted

Is there a way of recording/exposing when an activity is added to CiviCRM?

The creation date of an activity is not, by default, stored in CiviCRM. Depending on what you want to do, you can: Create a custom field like you suggested, and write an extension that fills in the ...
user avatar
3 votes
Accepted

Is it possible to customize the automatic date ranges in Advanced Search?

I'm not sure where to start as I can't answer the main question apart from quoting a colleague Jon Goldberg 29/Mar/15 5:19 AM for now, you can use the PHP overrides folder to maintain your own ...
user avatar
  • 3,440
3 votes

Can civirules be triggered off a custom field of type date for eg Date equals Now

You are on the right track with using now in field comparision. See my Question and Answer here. trigger: daily trigger for group members condition: field value comparison for a date, datetime or ...
user avatar
3 votes
Accepted

Is there a way to have a "from and to" field , need this for business hours "to and from"

This is not currently available in CiviCRM to have time range custom field. The alternate solution would be to create two date time field To and From and using buildForm hook and PageRun hook and/or ...
user avatar
3 votes

Contact reminder

You can create a scheduled Activity with this contact. https://docs.civicrm.org/user/en/latest/organising-your-data/activities/ via the Actions button on the contacts Summary screen If you add the ...
user avatar
3 votes

How to suppress translation of months (or all fields) in receipts?

Welcome to CiviCRM SE KLeeHK! I am not sure if you can suppress the translation of particular Smarty tags e.g. {$receive_date} or change the date format of only this occurence. The receipts can be ...
user avatar
  • 3,309
3 votes

How to create new Relative Date Filter?

Certain ones can work by just adding option values, but I don't think everything. For example @andy-clark you can do prior 6 months as "ending_6.month" which is supported by the default clause here ...
user avatar
  • 17.6k
3 votes
Accepted

Date in English even when page is set to french

Your server must support the requested locale (ex: fr_FR.utf8). On Debian-based systems, as root (administrator), you can enable it with: dpkg-reconfigure locales and then enable the locale. It does ...
user avatar
  • 2,976
3 votes

Event on several different days

As an alternate I feel you can create price sets that shows price field for each date (Label?). And tweak the calendar plugin to use price field to show event on three different dates
user avatar
2 votes
Accepted

Where are CiviCRM's date preferences actually used?

There are actually (at least) two places where you can change the formats. One is where you described, the other one (that affects most of the displayed date formats e.g. in the contact tab) is ...
user avatar
  • 3,309
2 votes

How do I override the default date range of JQuery date widget?

I think the answer may be that this is working in 4.7.7 - set your date range in the Custom Field - Edit screen [I want to go back 30 years]: Custom Date SE field: And this is indeed giving me a ...
user avatar
2 votes

How do I override the default date range of JQuery date widget?

Have you tried adjusting the settings at Administer > Customize Data and Screens > Date Preferences. to achieve what you want?
user avatar
  • 3,440
2 votes
Accepted

How can I disable the JQuery date widget and all just text input?

Adding the following CSS disables the date picker widget and allows users to simply type the date into the field:- #ui-datepicker-div, .ui-datepicker .ui-widget { display: none !important; }
user avatar
  • 696

Only top scored, non community-wiki answers of a minimum length are eligible