formtools / core

The Form Tools Core.
https://formtools.org
207 stars 78 forks source link

Searching records "Before" a date defaults to 10/16/2004 - how to change #630

Open jgold723 opened 5 years ago

jgold723 commented 5 years ago

When I try searching for records before a certain date (any date), the range always begins at 10/16/2004. How can I change that?

nelsondcosta23 commented 5 years ago

I was looking arround, I didnt find nothing for now... If find I let you know.

nelsondcosta23 commented 5 years ago

See if this might help you https://github.com/formtools/core/issues/610

jgold723 commented 5 years ago

Thanks. Actually I found it living in /global/scripts/daterangepicker.jquery.js on line 51 (earliestDate)

Line 51 tells the script to look back 15 years for the start of the "before" range (earliestDate). I was able to change that -99 years. Oddly enough, that's as far as I could go -- if I made the earliestDate -100 or more, it seems to break the script. I'm not sure why though -- I'd be curious to find out why.