Answers.Body: <p>Looks like a bug for PH* strict rule</p>
  <p>Submitted a <a href="https://github.com/civicrm/civicrm-core/pull/27228" rel="noreferrer">PR</a>, can you test and add your comments on the PR?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-31T12:39:40.407Z
Answers.Text: Tested, looks working, cheers.
Answers.UserDisplayName: yurg
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-31T13:23:31.667Z
Answers.Text: Perfect, thanks for adding a review comment on the PR
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-31T09:17:22.237Z
Answers.LastActivityDate: 2023-08-31T09:17:22.237Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Drupal 10 /CiviCRM 5.64.2</p>
  <ul>
  <li>Membership Expiration Date selection is limited to &quot;today&quot; so it is not possible to select a future date (eg. Dec 2023). Possible years selection range is 2013 - 2023, where both 2013 and 2023 have limited months selection (Jan - Aug), all other years have normal Jan - Dec range</li>
  <li>Contribution Date years selection range is 2003 - 2013 (!) with the same months range issue for the 1st and the last year in range (2003, 2013)</li>
  </ul>
  <p>Probably this has something to do with &quot;Settings - Date Preferences&quot; civicrm/admin/setting/preferences/date?reset=1 - by poking around activityDate Start and End offcet, I've been able to reduce possible datepicker range to one day ( today), empty the future years selection completely, etc.<br />
  The only  possible related message in logs would be this one:</p>
  <pre><code>[warning] Deprecated function CRM_Core_BAO_PreferencesDate::retrieve, use API.
  CRM_Core_Error::deprecatedFunctionWarning
  CRM_Core_BAO_PreferencesDate::retrieve
  CRM_Admin_Form::preProcess
  CRM_Core_Form::buildForm
  </code></pre>
  <p>Haven't seen nothing like this before, can't reproduce on <a href="https://dmaster.demo.civicrm.org/" rel="nofollow noreferrer">https://dmaster.demo.civicrm.org/</a>,   what would this be?</p>
  <p><a href="https://i.sstatic.net/X2UMe.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/X2UMe.png" alt="Contribution" /></a>
  <a href="https://i.sstatic.net/Ewmln.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Ewmln.png" alt="Membership" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-30T20:28:50.157Z
Comments.Text: Did you try it on https://d10-master.demo.civicrm.org/?
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-30T21:04:27.730Z
Comments.Text: I tried it and it works on the D10 demo site. Maybe an extension? CRM_Core_BAO_PreferencesDate::retrieve isn't called anywhere from core, so I'd see if you can maybe grep for that in your extensions and then disable any extension that is calling it.
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-31T02:05:37.480Z
Comments.Text: On the retrieve() call, that happens on a lot of admin pages and you can't grep for it with a classname because it's [$this->_BAOName::retrieve](https://github.com/civicrm/civicrm-core/blob/7ccb9b94fc9199ecb461a920bade3771af3c2277/CRM/Admin/Form.php#L157). So it's probably core, but I don't think related to the range problem.
Comments.UserDisplayName: Demerit
Tags: <drupal><datepicker>
Title: Datepicker issue on Membership and Contribution edit pages
ThreadText: # Datepicker issue on Membership and Contribution edit pages
  
  (Asked by: username_0 on 2023-08-30)
  
  Drupal 10 /CiviCRM 5.64.2
  
  * Membership Expiration Date selection is limited to "today" so it is not possible to select a future date (eg. Dec 2023). Possible years selection range is 2013 - 2023, where both 2013 and 2023 have limited months selection (Jan - Aug), all other years have normal Jan - Dec range
  * Contribution Date years selection range is 2003 - 2013 (!) with the same months range issue for the 1st and the last year in range (2003, 2013)
  
  Probably this has something to do with "Settings - Date Preferences" civicrm/admin/setting/preferences/date?reset=1 - by poking around activityDate Start and End offcet, I've been able to reduce possible datepicker range to one day ( today), empty the future years selection completely, etc.  
  The only possible related message in logs would be this one:
  
  ```
  [warning] Deprecated function CRM_Core_BAO_PreferencesDate::retrieve, use API.
  CRM_Core_Error::deprecatedFunctionWarning
  CRM_Core_BAO_PreferencesDate::retrieve
  CRM_Admin_Form::preProcess
  CRM_Core_Form::buildForm
  
  ```
  
  Haven't seen nothing like this before, can't reproduce on <https://dmaster.demo.civicrm.org/>, what would this be?
  
  [![Contribution](https://i.sstatic.net/X2UMe.png)](https://i.sstatic.net/X2UMe.png)
  [![Membership](https://i.sstatic.net/Ewmln.png)](https://i.sstatic.net/Ewmln.png)
  
  **Tags:** drupal, datepicker
  
  > **Comments:**
  > **username_1**: Did you try it on https://d10-master.demo.civicrm.org/?  
  > **username_1**: I tried it and it works on the D10 demo site. Maybe an extension? CRM_Core_BAO_PreferencesDate::retrieve isn't called anywhere from core, so I'd see if you can maybe grep for that in your extensions and then disable any extension that is calling it.  
  > **username_2**: On the retrieve() call, that happens on a lot of admin pages and you can't grep for it with a classname because it's [$this->_BAOName::retrieve](https://github.com/civicrm/civicrm-core/blob/7ccb9b94fc9199ecb461a920bade3771af3c2277/CRM/Admin/Form.php#L157). So it's probably core, but I don't think related to the range problem.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2023-08-31. Score: 4 | Accepted answer
  
  Looks like a bug for PH\* strict rule
  
  Submitted a [PR](https://github.com/civicrm/civicrm-core/pull/27228), can you test and add your comments on the PR?
  
  > **Comments:**
  > **username_0**: Tested, looks working, cheers.  
  > **username_3**: Perfect, thanks for adding a review comment on the PR  
  
  ---
  
  