newhck / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

date selector : be able to change year range offered to user. #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a Date Selector to the form
2. After you fixed issue 49, you can now select the year/month from a list
3. You cannot change the list range for the year, so user is limited in 
selecting between 1990-2010.

What is the expected output? What do you see instead?
now you see 1990-2010 (20 year range) but you should be able to give a range 
yourself. By example if you create a form where the user needs to provide his 
birthday, the missing years are very confusing.

What version of the product are you using? On what operating system?
1.0.7

Please provide any additional information below.
add two parameters for the addDate method: minYear & maxYear and provide the 
values to the JQuery UI datepicker like this: yearRange: 'minYear:maxYear' or 
by example yearRange: '1900:2010'

Original issue reported on code.google.com by uwictpar...@gmail.com on 22 Jun 2010 at 8:36

GoogleCodeExporter commented 8 years ago

Original comment by ajporterfield@gmail.com on 10 Jul 2010 at 3:47

GoogleCodeExporter commented 8 years ago
The latest revision (r273) in the svn working copy includes a new element 
attribute - jqueryParams - that can be used to apply any supported jQueryUI 
datepicker option.  This includes the yearRange option which is what you're 
needing in this specific request.  A full list of support options can be found 
in the Options tab at http://jqueryui.com/demos/datepicker/.  Also in r273, the 
jQuery example file has been updated to include how this new attribute is used.

Another thing to note here is that the old min, max, and months attributes can 
still be used if you choose for backwards compatibility.

Currently, only the date and daterange elements have support for the 
jqueryParams element attribute; however, each element that uses a jQuery plugin 
will be updated to include this support in the near future.

Original comment by ajporterfield@gmail.com on 10 Jul 2010 at 4:16

GoogleCodeExporter commented 8 years ago
I forgot to mention that you can download a copy of the latest revision by 
using the svn export command...

svn export http://php-form-builder-class.googlecode.com/svn/trunk/ 
php-form-builder-class

...when you have the opportunity, give the changes a test and let me know if 
this meets your needs.

Thanks,
Andrew

Original comment by ajporterfield@gmail.com on 10 Jul 2010 at 4:18

GoogleCodeExporter commented 8 years ago
One quick update...

jqueryParams has been changed to jqueryOptions in the working copy as of r275.  
jQuery refers to them as options, so it makes the most sense to stay consistent 
with the verbiage. 

Original comment by ajporterfield@gmail.com on 13 Jul 2010 at 1:50

GoogleCodeExporter commented 8 years ago
Version 1.0.8 which was released earlier this month has the jqueryParams 
element attribute and the updated jquery example file included.

Original comment by ajporterfield@gmail.com on 2 Aug 2010 at 7:46