Replace jcalendar instances with datepicker
We have been phasing out jcalendar since ? 4.x? there are a handful of instances left to switch over.
Once they are all gone we should be able to remove some php handling - datepicker handles date format at the js layer meaning the php/ form layer only needs to handle one format of dates
Note that removing jcalendar will remove a number of points of fragility as the datepicker is more robust
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- eileen mentioned in issue #558 (closed)
mentioned in issue #558 (closed)
- Owner
doing a grep shows me here are all the places that it currently resides
templates/CRM/Grant/Form/Task/Update.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=decision_date}<br /> templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_application_received_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_application_received_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_decision_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_decision_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_money_transfer_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_money_transfer_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date_high} templates/CRM/Contact/Form/Search/Custom.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=$element}</td> templates/CRM/Contact/Form/Search/Custom/ActivitySearch.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$element} templates/CRM/Contact/Form/Search/Custom/EventDetails.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}</td> templates/CRM/Contact/Form/Search/Custom/EventDetails.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=end_date}</td> templates/CRM/Pledge/Form/Payment.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=scheduled_date}</td> templates/CRM/Price/Form/Field.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=active_on} templates/CRM/Price/Form/Field.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=expire_on} templates/CRM/Contribute/Form/Task/Status.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=$element_name}</td> templates/CRM/Contribute/Form/ContributionPage/Amount.tpl: <span id="pledge_calendar_date_field"> {include file="CRM/common/jcalendar.tpl" elementName=pledge_calendar_date}</span> templates/CRM/Contribute/Form/Contribution/Main.tpl: <div class="label">{$form.start_date.label}</div><div class="content">{include file="CRM/common/jcalendar.tpl" elementName=start_date}</div> templates/CRM/Contribute/Form/AdditionalInfo/Premium.tpl: <td class="html-adjust">{include file="CRM/common/jcalendar.tpl" elementName=fulfilled_date}</td> templates/CRM/Activity/Form/Activity.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</td> templates/CRM/Activity/Form/FollowUp.tpl: {include file="CRM/common/jcalendar.tpl" elementName=followup_date} templates/CRM/Member/Form/MembershipCommon.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=receive_date}</td> templates/CRM/Member/Form/MembershipRenewal.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=renewal_date}</td> templates/CRM/Campaign/Form/Task/Interview.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$fieldName elementIndex=$voterId batchUpdate=1} templates/CRM/Campaign/Form/Campaign.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Campaign/Form/Campaign.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=end_date}</td> templates/CRM/Campaign/Form/Search/Campaign.tpl: {include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Campaign/Form/Search/Campaign.tpl: {include file="CRM/common/jcalendar.tpl" elementName=end_date} templates/CRM/Admin/Form/ScheduleReminders.tpl: <td colspan="3">{include file="CRM/common/jcalendar.tpl" elementName=absolute_date} <strong id='OR'>OR</strong><br /></td> templates/CRM/Core/AgeRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$dateName} templates/CRM/Core/DateRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$fromName} templates/CRM/Core/DateRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$toName} templates/CRM/Case/Form/Activity/OpenCase.tpl: {include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Case/Form/Activity/ChangeCaseStartDate.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}</td> templates/CRM/Case/Form/Activity/ChangeCaseType.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=reset_date_time}</td> templates/CRM/Case/Form/Activity.tpl: <div style="display: none;">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</div> templates/CRM/Case/Form/Activity.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</td> templates/CRM/Case/Form/ActivityTab.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$activitylow} templates/CRM/Case/Form/ActivityTab.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$activityhigh} templates/CRM/Mailing/Form/Schedule.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}
- Owner
Places still left without a PR
templates/CRM/Grant/Form/Task/Update.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=decision_date}<br /> templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_application_received_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_application_received_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_decision_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_decision_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_money_transfer_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_money_transfer_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date_high} templates/CRM/Contact/Form/Search/Custom.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=$element}</td> templates/CRM/Price/Form/Field.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=active_on} templates/CRM/Price/Form/Field.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=expire_on} templates/CRM/Contribute/Form/Task/Status.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=$element_name}</td> templates/CRM/Contribute/Form/ContributionPage/Amount.tpl: <span id="pledge_calendar_date_field"> {include file="CRM/common/jcalendar.tpl" elementName=pledge_calendar_date}</span> templates/CRM/Contribute/Form/Contribution/Main.tpl: <div class="label">{$form.start_date.label}</div><div class="content">{include file="CRM/common/jcalendar.tpl" elementName=start_date}</div> templates/CRM/Contribute/Form/AdditionalInfo/Premium.tpl: <td class="html-adjust">{include file="CRM/common/jcalendar.tpl" elementName=fulfilled_date}</td> templates/CRM/Activity/Form/Activity.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</td> templates/CRM/Activity/Form/FollowUp.tpl: {include file="CRM/common/jcalendar.tpl" elementName=followup_date} templates/CRM/Member/Form/MembershipCommon.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=receive_date}</td> templates/CRM/Member/Form/MembershipRenewal.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=renewal_date}</td> templates/CRM/Campaign/Form/Task/Interview.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$fieldName elementIndex=$voterId batchUpdate=1} templates/CRM/Campaign/Form/Campaign.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Campaign/Form/Campaign.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=end_date}</td> templates/CRM/Campaign/Form/Search/Campaign.tpl: {include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Campaign/Form/Search/Campaign.tpl: {include file="CRM/common/jcalendar.tpl" elementName=end_date} templates/CRM/Admin/Form/ScheduleReminders.tpl: <td colspan="3">{include file="CRM/common/jcalendar.tpl" elementName=absolute_date} <strong id='OR'>OR</strong><br /></td> templates/CRM/Core/AgeRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$dateName} templates/CRM/Core/DateRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$fromName} templates/CRM/Core/DateRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$toName} templates/CRM/Case/Form/Activity/OpenCase.tpl: {include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Case/Form/Activity/ChangeCaseStartDate.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}</td> templates/CRM/Case/Form/Activity/ChangeCaseType.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=reset_date_time}</td> templates/CRM/Case/Form/Activity.tpl: <div style="display: none;">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</div> templates/CRM/Case/Form/Activity.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</td> templates/CRM/Case/Form/ActivityTab.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$activitylow} templates/CRM/Case/Form/ActivityTab.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$activityhigh}
@seamuslee good effort - I'd be happy to stagger the next lot until after the rc is cut
- Owner
Yep and i'm happy to do tick tac review as well to try to close these out. also @eileen there is one small bug with your revision of one of my PRs submitted.
- Owner
So after latest bunch of PRs are merged we will be down to
templates/CRM/Grant/Form/Task/Update.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=decision_date}<br /> templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_application_received_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_application_received_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_decision_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_decision_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_money_transfer_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_money_transfer_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date_high} templates/CRM/Contribute/Form/Task/Status.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=$element_name}</td> templates/CRM/Contribute/Form/ContributionPage/Amount.tpl: <span id="pledge_calendar_date_field"> {include file="CRM/common/jcalendar.tpl" elementName=pledge_calendar_date}</span> templates/CRM/Contribute/Form/Contribution/Main.tpl: <div class="label">{$form.start_date.label}</div><div class="content">{include file="CRM/common/jcalendar.tpl" elementName=start_date}</div> templates/CRM/Contribute/Form/AdditionalInfo/Premium.tpl: <td class="html-adjust">{include file="CRM/common/jcalendar.tpl" elementName=fulfilled_date}</td> templates/CRM/Activity/Form/Activity.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</td> templates/CRM/Activity/Form/FollowUp.tpl: {include file="CRM/common/jcalendar.tpl" elementName=followup_date} templates/CRM/Member/Form/MembershipCommon.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=receive_date}</td> templates/CRM/Member/Form/MembershipRenewal.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=renewal_date}</td> templates/CRM/Campaign/Form/Task/Interview.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$fieldName elementIndex=$voterId batchUpdate=1} templates/CRM/Campaign/Form/Campaign.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Campaign/Form/Campaign.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=end_date}</td> templates/CRM/Campaign/Form/Search/Campaign.tpl: {include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Campaign/Form/Search/Campaign.tpl: {include file="CRM/common/jcalendar.tpl" elementName=end_date} templates/CRM/Admin/Form/ScheduleReminders.tpl: <td colspan="3">{include file="CRM/common/jcalendar.tpl" elementName=absolute_date} <strong id='OR'>OR</strong><br /></td> templates/CRM/Core/AgeRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$dateName} templates/CRM/Core/DateRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$fromName} templates/CRM/Core/DateRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$toName} templates/CRM/Case/Form/Activity/OpenCase.tpl: {include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Case/Form/Activity/ChangeCaseStartDate.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date}</td> templates/CRM/Case/Form/Activity/ChangeCaseType.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=reset_date_time}</td> templates/CRM/Case/Form/Activity.tpl: <div style="display: none;">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</div> templates/CRM/Case/Form/Activity.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=activity_date_time}</td> templates/CRM/Case/Form/ActivityTab.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$activitylow} templates/CRM/Case/Form/ActivityTab.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$activityhigh}
- Developer
@monish.deb as a medium priority (I know you're busy) for core work this month could you work on the Grant Form replacement? I see @eileen has some ideas about how it should work https://chat.civicrm.org/civicrm/pl/u65txqogcbynbe4o7sg9bwwair so perhaps there is a PR out there somewhere.
@JoeMurray @monish.deb - it looks like Eileen already has submitted https://github.com/civicrm/civicrm-core/pull/13211 for the grant form.
Great work @seamuslee and @eileen and @mattwire. I'll work on the Activity/Case forms next.
- Developer
@JoeMurray @colemanw right the thing about changing the search forms is that the date from / to actually affects ALL date search fields as jcalendar is called from a shared template so we need a way to migrate over. Grant form seems like a good place to get the approach right here as a is lower traffic
- Developer
Reviewed by @jitendra https://github.com/civicrm/civicrm-core/pull/13241 Merged now.
- Owner
After the merge of Coleman's PR
we are now down to
templates/CRM/Grant/Form/Task/Update.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=decision_date}<br /> templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_application_received_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_application_received_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_decision_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_decision_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_money_transfer_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_money_transfer_date_high} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date_low} templates/CRM/Grant/Form/Search/Common.tpl: {include file="CRM/common/jcalendar.tpl" elementName=grant_due_date_high} templates/CRM/Contribute/Form/Task/Status.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=$element_name}</td> templates/CRM/Contribute/Form/ContributionPage/Amount.tpl: <span id="pledge_calendar_date_field"> {include file="CRM/common/jcalendar.tpl" elementName=pledge_calendar_date}</span> templates/CRM/Contribute/Form/Contribution/Main.tpl: <div class="label">{$form.start_date.label}</div><div class="content">{include file="CRM/common/jcalendar.tpl" elementName=start_date}</div> templates/CRM/Contribute/Form/AdditionalInfo/Premium.tpl: <td class="html-adjust">{include file="CRM/common/jcalendar.tpl" elementName=fulfilled_date}</td> templates/CRM/Activity/Form/FollowUp.tpl: {include file="CRM/common/jcalendar.tpl" elementName=followup_date} templates/CRM/Member/Form/MembershipCommon.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=receive_date}</td> templates/CRM/Member/Form/MembershipRenewal.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=renewal_date}</td> templates/CRM/Campaign/Form/Task/Interview.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$fieldName elementIndex=$voterId batchUpdate=1} templates/CRM/Campaign/Form/Campaign.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Campaign/Form/Campaign.tpl: <td class="view-value">{include file="CRM/common/jcalendar.tpl" elementName=end_date}</td> templates/CRM/Campaign/Form/Search/Campaign.tpl: {include file="CRM/common/jcalendar.tpl" elementName=start_date} templates/CRM/Campaign/Form/Search/Campaign.tpl: {include file="CRM/common/jcalendar.tpl" elementName=end_date} templates/CRM/Core/AgeRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$dateName} templates/CRM/Core/DateRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$fromName} templates/CRM/Core/DateRange.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$toName} templates/CRM/Case/Form/Activity/ChangeCaseType.tpl: <td>{include file="CRM/common/jcalendar.tpl" elementName=reset_date_time}</td> templates/CRM/Case/Form/ActivityTab.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$activitylow} templates/CRM/Case/Form/ActivityTab.tpl: {include file="CRM/common/jcalendar.tpl" elementName=$activityhigh}
Eileen is working on the grant ones which might provide guidance on the date and age range ones. ping @monish.deb et al
https://github.com/civicrm/civicrm-core/pull/13395 covers upgrading smart groups using the grant fields - I think campaign search will be very similar to Grant search but BIG WARNING 'DateRange.tpl' is actually a huge thing in itself as that represents many many places where jcalendar is used & I don't think it is a one-hit change :-( The Grant change assumes a migration from DateRange to templates/CRM/Core/DatePickerRange.tpl
(moved to #753 (closed))
Edited by Daniël van Vuuren@adanielvv can you open a new issue - we'll need to triage it as a regression
@colemanw ^^
- Daniël van Vuuren mentioned in issue #753 (closed)
mentioned in issue #753 (closed)
Thanks for replying @eileen! Just created the issue: #753 (closed)
- eileen mentioned in issue #817 (closed)
mentioned in issue #817 (closed)
- eileen changed the description
changed the description
- Owner
I have just put up a PR to convert the case search forms to using the datepicker
These are the final areas that seem to still be using the jcalendar
CRM/Contact/Form/Search/Criteria.php: CRM_Core_Form_Date::buildDateRange($form, 'log_date', 1, '_low', '_high', ts('From:'), FALSE, FALSE); CRM/Contact/Form/Search/Criteria.php: CRM_Core_Form_Date::buildDateRange($form, 'relation_start_date', 1, '_low', '_high', ts('From:'), FALSE, FALSE); CRM/Contact/Form/Search/Criteria.php: CRM_Core_Form_Date::buildDateRange($form, 'relation_end_date', 1, '_low', '_high', ts('From:'), FALSE, FALSE); CRM/Contact/Form/Search/Criteria.php: CRM_Core_Form_Date::buildDateRange($form, 'relation_active_period_date', 1, '_low', '_high', ts('From:'), FALSE, FALSE); CRM/Contact/Form/Search/Criteria.php: CRM_Core_Form_Date::buildDateRange($form, 'relation_date', 1, '_low', '_high', ts('From:'), FALSE, FALSE); CRM/Contact/Form/Search/Criteria.php: CRM_Core_Form_Date::buildDateRange($form, 'birth_date', 1, '_low', '_high', ts('From'), FALSE, FALSE, 'birth'); CRM/Contact/Form/Search/Criteria.php: CRM_Core_Form_Date::buildDateRange($form, 'deceased_date', 1, '_low', '_high', ts('From'), FALSE, FALSE, 'birth'); CRM/Contact/Form/Search/Criteria.php: CRM_Core_Form_Date::buildDateRange($form, $elementName, 1, '_from', '_to', ts('From:'), FALSE); CRM/Report/Form.php: CRM_Core_Form_Date::buildDateRange($this, $fieldName, $count, '_from', '_to', ts('From:'), FALSE, $operations); CRM/Report/Form.php: CRM_Core_Form_Date::buildDateRange($this, $fieldName, $count, '_from', '_to', ts('From:'), FALSE, $operations, 'searchDate', TRUE); CRM/Event/BAO/Query.php: CRM_Core_Form_Date::buildDateRange($form, 'event', 1, '_start_date_low', '_end_date_high', ts('From'), FALSE); CRM/Core/Form/Date.php: public static function buildDateRange( CRM/Core/BAO/Query.php: CRM_Core_Form_Date::buildDateRange($form, $elementName, 1, '_from', '_to', ts('From:'), FALSE); CRM/Mailing/BAO/Query.php: CRM_Core_Form_Date::buildDateRange($form, 'mailing_date', 1, '_low', '_high', ts('From'), FALSE);
Note for both Event is quite annoying in that it is using one form field to query 2 different db fields
Edited by seamuslee - Owner
So we are almost there folks
@eileen and I have hit upon an odd one in doing this final conversion.
We have a one date search field that can be for modified date or added date, users can use a radio button to select which one they want. Eileen is proposing and i am supportive of splitting this into 2 separate date fields a created date and modified date. The issue we have run into is that if you just search by filling out the date field the search form suggests it will search on modified date but the Qill that is generated suggests added by and i would want to know which of the 2 new fields would we populate on upgrade
thoughts @eileen @colemanw @JoeMurray @monish.deb @adanielvv @totten
Note this PR is the place to discuss the last comment https://github.com/civicrm/civicrm-core/pull/15693
- Owner
So I believe that all the last instances in search forms were taken care of in 5.20 the only place in core that still uses it is in Reports which i have a PR to handle the conversion https://github.com/civicrm/civicrm-core/pull/15709 but there is the issue there of using
_to
and_from
rather than_high
and_low
that i think Eileen wants to look into at some point - Owner
@eileen do you think we need to do anything to mark it as deprecated now?
As of 5.24.4 Advanced Search doesn't seem to be respecting the year offset in Date Preferences. https://civicrm.stackexchange.com/questions/35415/advanced-search-not-affected-by-date-preferences is this related, or am I missing something like a different setting?
Edited by Stoob- Owner
@eileen did we resolve Stoob's issue here and also is there anything more we need to do on this ticket do you think?
@seamuslee I think it is Ok to solve given that was 11 months ago - if it still is an issue @Stoob can you create a new issue
- eileen closed
closed