Current Version is: 1.3
1.3 NOTES: Added custom error message to make it more understandable. Added the ‘sweaty palms’ setting that now actually does something
Read the setting section below for more info.
Here’s a little extension to help date entry, both in SAEF forms and in the CP. Many times the default date formatting (YYYY-MM-DD HH:MM) is very confusing and not very user friendly. Blind Date applies a little date lovin for those in need.
It will accept any user readable date - if you can understand it Blind Date should be able to. Keep in mind that this extension relies heavily on the strtotime() PHP function, and as such that function is what determines whether a date is readable or not. Here’s some documentation about what date formats are readable: date input formats
When a date is found that can’t be parsed, it will throw a custom error (you can change this in the language file). It does a heroic job at attempting to understand dates though - supplying Jan 33rd will result in Feb 2nd for example - Blind Date is desperate for any action it can get!
Personality Quirks: (helpful tips)
• Blind Date will cruise all date fields in the system (both SAEF and CP) - including entry_date, edit_date and expiration_date.
• By default, if no year is specified, then the current year is used. If a time is given along with the date that time will be honored - if no time is given it defaults to 12:01 AM.
• Be careful what you ask for! Your preferences (settings) can potentially lead to a horrible Blind Date experience! If you set a preference for one of the default system fields (like entry_date) then it applies to EVERY entry_date field throughout the system. You’ve been warned!
Helpful hints to make your Blind Date a successful one (settings):
Separate fields with a |.
Thinking Long Term? (force future date) - List the fields you would like to force into the future . Example: If today is March 15, 2007 and Jan 3rd is supplied, the resulting date will be Jan 3rd, 2008. If Jan 3rd 2005 is entered, the resulting date will be Jan 3rd, 2008. (this is handy for using with the ‘expiration_date’ field.)
Punctual to a Fault (force 12:01 AM) - Did you say something embarrassing, or maybe spill red wine on your date’s miniskirt? Rewind the clock - fields set here are forced to use 12:01 AM as the entry time.
Fashionably Late (honor time, otherwise 11:59 PM) - Want a long date but don’t want to seem desperate? Any field listed here will honor a time if it is given, and if no time is given will use 11:59 PM.
Disastrously Late (force 11:59 PM) - Oh boy. Ignore the time given and show up at 11:59 PM, no ifs, ands or buts. You might not be on time, but at least you have the day right. Hope you brought flowers.
Sweaty Palms? - If you have sweaty palms, it will force an empty expiration_date field to take on the same date as the entry_date field, but with a time of 11:59 PM (it expires at the end of the day).
