Answers.Body: <p>I think you'll need an extension for this.  Use the <code>hook_civicrm_validateForm</code> if you just need to prevent prior dates from being entered on the back-end activity form.  If you need to block ALL forms of adding a prior date, you may want to use the <code>hook_civicrm_pre</code> hook (this will block Webform-CiviCRM, API, etc.).</p>
  
  <p>You may want to set exclusions for administrators if you do this!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-22T13:41:00.887Z
Answers.Text: thank you @Jon, i just need to prevent prior dates from being entered on the back-end activity form. I will have to look into the extension though i have no experience writing extensions. Wonder if there is any other easy way out:)
Answers.UserDisplayName: Kboy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-23T07:33:53.973Z
Answers.Text: If you want to customize CiviCRM, developing an extension is the way to go. Any shortcut might work, but is usually in the way when upgrading, possibly interferes with core code and is not transparant if any one else takes a look. So please invest a little time to study how to create an extension.
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-21T19:18:41.340Z
Answers.LastActivityDate: 2017-10-21T19:18:41.340Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I have a custom field of type Date used for activities, even though i have set years prior to current date to 0, it still allows users to select past day and month of the current year.</p>
  
  <p>Is there any quick fix for this, can anyone give me a hint?</p>
  
  <p>CiviCRM 4.6.33</p>
  
Tags: <custom-fields><activities><dates>
Title: How to disable possibility to enter past date in activities?
ThreadText: # How to disable possibility to enter past date in activities?
  
  (Asked by: username_0 on 2017-10-21)
  
  I have a custom field of type Date used for activities, even though i have set years prior to current date to 0, it still allows users to select past day and month of the current year.
  
  Is there any quick fix for this, can anyone give me a hint?
  
  CiviCRM 4.6.33
  
  **Tags:** custom-fields, activities, dates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-10-21. Score: 2
  
  I think you'll need an extension for this. Use the `hook_civicrm_validateForm` if you just need to prevent prior dates from being entered on the back-end activity form. If you need to block ALL forms of adding a prior date, you may want to use the `hook_civicrm_pre` hook (this will block Webform-CiviCRM, API, etc.).
  
  You may want to set exclusions for administrators if you do this!
  
  > **Comments:**
  > **username_0**: thank you @Jon, i just need to prevent prior dates from being entered on the back-end activity form. I will have to look into the extension though i have no experience writing extensions. Wonder if there is any other easy way out:)  
  > **username_2**: If you want to customize CiviCRM, developing an extension is the way to go. Any shortcut might work, but is usually in the way when upgrading, possibly interferes with core code and is not transparant if any one else takes a look. So please invest a little time to study how to create an extension.  
  
  ---
  
  