Form Tools
Disable calendar in Date field (adding validation) or modify date range for pop up - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Disable calendar in Date field (adding validation) or modify date range for pop up (/showthread.php?tid=2528)

Pages: 1 2


Disable calendar in Date field (adding validation) or modify date range for pop up - johnbleck2 - Jul 12th, 2013

We are looking to use a date field that submitters will normally be entering between 50-75 years from the current date. Since the calendar pop up does not have a "scroll" for year I would like to either disable the calendar and keep a date field (and force submitters to use a mm/dd/yyyy format and validate on that format), or at the very least change the default value for the calendar to 50 years prior to current date.

I noticed there are many "options" for date-range in the daterangepicker.jquery.js, but I have no idea how to enable a different date range than the current date or 'today' for the calendar on a date field.

Is there an obvious or easy way to do this that I just haven't noticed?







RE: Disable calendar in Date field (adding validation) or modify date range for pop up - johnbleck2 - Jul 15th, 2013

For my purpose, I was able to modify the formtools/mysite/themes/default/scripts/jquery-ui-1.8.6.custom.min.js

Looking at the jquery documentation for this widget, I was able to modify the default range for the year pulldown.
Default is yearRange:"c-10:c+10"
I changed it to yearRange:"c-100:c"

If dealing with birth dates, I would suggest c-125:c since we continue to live longer. I think the oldest individual is 120? Anyway, this solves my problem. Just wanted people to know what to modify for increasing the year range in the calendar.

One final note: Avoid using a negative number after the : for this variable. The Max expects to be at least the current date, if you use a negative year for the max, the calendar comes up with bad data.


RE: Disable calendar in Date field (adding validation) or modify date range for pop up - Joe - Jul 17th, 2013

John,

Thanks for posting your solution.

Cheers,

Joe


RE: Disable calendar in Date field (adding validation) or modify date range for pop up - saeed20 - Jun 16th, 2020

property for sale in budapest


RE: Disable calendar in Date field (adding validation) or modify date range for pop up - liam john - Oct 17th, 2020

The attractive combination of vibrant and subtle colors present in the Descendants 2 Carlos Jacket is the perfect portrayal of the work of a proficient mind. New American Jackets has kept the color as well as the skin-fit feature of this jacket just as the same that you adore.


RE: Disable calendar in Date field (adding validation) or modify date range for pop up - katuupaul - Oct 28th, 2020

(Oct 17th, 2020, 3:39 AM)liam john Wrote: The attractive combination of vibrant and subtle colors present in the Descendants 2 Carlos Jacket is the perfect portrayal of the work of a proficient mind. New American Jackets has kept the color as well as the skin-fit feature of this jacket just as the same that you adore.

Technical Analysis course in Hyderabad

NCFM Academy Hyderabad - A.S.Chakravarthy, Stock Market Technical Analysis Training Course Institute in Hyderabad, on Stock Market Courses for Share Trading & Investment is The First, Best, Oldest and Leading Education Center and also for NISM-Equity Derivatives, Forex, Commodity, Mutual Funds Courses Coaching and Stock Market Classes in Hyderabad Telangana India. It become set up in 2004,


RE: Disable calendar in Date field (adding validation) or modify date range for pop up - TeresaWells - Mar 14th, 2021

I am a creative graphic designer with innovative ideas and a unique approach to visuals.More than three years of experience developing designs for print media, online websites like powerful love spells, video, and advertising. Solid understanding of marketing principles and advertising techniques. I have a strong interest in visual arts beyond graphic design. I am also a skilled painter, sculptor, and drawer. I have had several of my pieces displayed in local art shows and galleries, and work on custom commissioned pieces for people from time to time. Additionally, I have an interest in interior design and enjoy reading about elements of room decor.


RE: Disable calendar in Date field (adding validation) or modify date range for pop up - CarterWilso - Mar 18th, 2021

(Jul 17th, 2013, 8:05 PM)Joe Wrote: John,

Thanks for posting your solution.

Cheers,

Joe



RE: Disable calendar in Date field (adding validation) or modify date range for pop up - CarterWilso - Mar 18th, 2021

Hi, I am a Computer systems administrator from texas. Experienced in running a wide variety of software development Company. Looking for a new role in a It company.I have A Good Writing Skills And I Wrote Articles related to <a href="https://sites.google.com/view/freelovespell/Love-Spells">how to cast a spell with just words</a> it is related to Vashikaran And That Book Is very Famous these Days.


RE: Disable calendar in Date field (adding validation) or modify date range for pop up - josephcurch - Jun 25th, 2021

You start believing that you lack the skills and the abilities required to complete the project. This belief powers your avoidant skills. Thus you end up ignoring the project until the deadline looms over your head. When you are consciously aware of the fact that buying assignment online are putting off the project, imagine yourself holding a crystal ball. The ball shows you two outcomes.