CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Restrict date popup if date, month or both are not needed.
Pages: [1]

Author Topic: Restrict date popup if date, month or both are not needed.  (Read 2641 times)

Danny_Joris

  • Guest
Restrict date popup if date, month or both are not needed.
August 18, 2010, 12:31:46 pm
Hello,

I needed a custom data field with a dropdown to select years over a range of 75 years. Right now when you set the data to 'years' only (yyyy), the output is years indeed, but it opens a popup that where you have to select a date and month as well. This will confuse my users. Is it possible to restrict the popup in case date, month or both are not needed?

I'm going to use a text field instead for now.

Thanks in advance,
Danny

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Restrict date popup if date, month or both are not needed.
August 23, 2010, 06:10:07 am
Quote
Is it possible to restrict the popup in case date, month or both are not needed?
Nope.

Kurund
Found this reply helpful? Support CiviCRM

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Restrict date popup if date, month or both are not needed.
September 01, 2010, 07:59:08 pm
I agree this is an area of confusion. In older versions we used to handle the date via three select boxes -- using the standard quickform date type. And I believe we were able to limit to just the year field, etc. based on the date format selected. Currently, anything but a standard date or date+time format is pretty useless because of this UI restriction.

Maybe we could use the standard quickform date for these non-standard custom field options.

support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lakshr@ion.ac.uk

  • Guest
Re: Restrict date popup if date, month or both are not needed.
October 27, 2010, 01:43:34 am
I have the exact same problem...I understand that calendar widget may not be able to restrict input for just years.

Is there a way to disable the "Select Date" popup. That way the user can type in the year in (which they cant at the moment as the field forces to choose from the popup) - or by use of a different Drupal date popup module?

Unfortunately using a text field isn't an option for me as it leaves the field wide open for errors and we can't restrict the year values that can be entered ( last 5 years is what we want at the moment)

Thanks in advance
L

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Restrict date popup if date, month or both are not needed.
October 27, 2010, 07:59:45 am

currently no.

would be great if you can take a look and contribute a patch to make this happen. the code to handle dates is fairly well centralized (i think). u'll need fairly strong php and mysql expertise

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Restrict date popup if date, month or both are not needed.

This forum was archived on 2017-11-26.