Hi Brian,
I’d like to try to use this plugin but I can’t figure out how it works. I’ve installed it but i’m not sure what to do next. How exactly does it work? I would like people to enter a date in the saef via an input field and have that correspond to a custom date field in the cp. Is that what this does?
Thanks a lot.
Hi fodney,
Basically all this extension really does is allow you to enter dates into a date field in a more ‘readable’ way. This applies in both a SAEFs and the CP. By default, the system requires all date fields to have a format of: “2008-11-07 08:51 AM”. That’s not very easy to type in! If you use this plug-in, you could enter that same date any number of ways, and it allows you to only input what you want (you don’t have to input an hour or minute for instance):
Nov 11th, 2008, 8:51 AM Nov 11th, 2008
Would both be valid dates using Blind Date, and they would throw an error if you don’t use this extension.
It sounds like you don’t really need this extension to do what you want (although it might make entering the date on the SAEF easier). What you want to do is the default behavior of EE I believe - you set up a custom date field in the CP for your weblog, and then set up a SAEF for that weblog.
By default Blind Date will be applied to the ‘normal’ date fields that exist for all entries (entry_date, expiration_date, etc.) If you want it to be applied to custom web fields (like the one you created for your SAEF), then you would enter the name of the custom field in the settings of the Blind Date extension, so it knows you want human-readable dates to be allowed for your field.
I’ve been thinking of rewriting the extension and instructions to be less cute and more functional - that would probably have saved you some time…
Let me know if you need more help setting it up.
Side note to Logtenberg - I should have a new version of the extension ready either later today or definitely this weekend.
There is a new version up: 1.3
It changes the ‘sweaty palms’ setting in the extension settings so that, when on, it will make the entry expire the same day at 11:59, but ONLY if no expiration date is entered.
Also I modified it so it will throw a custom error message if it runs into a date it can’t parse. You can modify the language in the language file…
Cheers!
EDIT: you can find it in the initial post in this thread…
Brian,
Thanks so much. I get it now. That really works great. I’m gonna use it. I prefer it to having all the js of the calendar picker in the saef.
What if you had more than one custom date field that you wanted to use this with on a site? Can you enter multiple custom fields in the settings?
Thanks again.
Thanks Brian, I updated to the latest version and ran some tests with different settings for the following fields: entry date, expiration date, and a custom test date field. See the test results link below.
For each entry I used different settings. On the first three entries a set all 3 fields and each time the seconds would vary, but on the entry where I left the test_date empty the entry and expiration dates were set correctly at :00 seconds.
Unfortunately, I’m not a programmer so I don’t know why the results vary.
The reason I want to set the entry times down to the second is because I’m trying to orderby and sort entries using the custom date, along with other fields, but can’t unless the entries have set times down to the second.
Thanks for your help.
Hi sapid - thanks for doing that. I’ll look at those and see if I can’t figure out what is going on - I’ll probably give you a script to run on your server just to do some testing outside of this plug-in. Is this a dev box (local) or a live server? I’ll try to get to this today - hang tight!
sapid, could you take this file and put it on the same server as your site (this is totally independent of your EE install though - just put it somewhere you can access). Then point your browser to that file and tell me what results you get.
The theory here is that if you get funky results (the seconds shifted like you’re seeing currently) then the problem is something with the server (or possibly a bug with the PHP version they’re using??), if you get correct results here, then the problem is with the extension.
Thanks! (let me know if you need help using this file):
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.