We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
1
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
1
  • Home
  • Forums

Blind Date - use human readable dates in the CP & SAEFs

Development and Programming

Brian M.'s avatar
Brian M.
529 posts
17 years ago
Brian M.'s avatar Brian M.

I’ve posted a new version of Blind Date (1.2.5). This is a bug fix. I discovered an issue involving dst - if the current dst and the dst of the supplied date in a given field were different, the time would shift an hour. Makes sense, but when you’re entering 9AM for a date in the future (or the past) and it consistently shifts to 8AM that’s not really the desired effect.

I’d recommend if you’re using Blind Date to upgrade to 1.2.5 as you’ll probably run into this issue at some point.

EDIT: get the new version in the 1st post.

hothousegraphix this might have been the issue you were having with time shifts - you might give this version a shot.

       
J.B.'s avatar
J.B.
79 posts
16 years ago
J.B.'s avatar J.B.

I’ve got an issue where SAEF Calendar plugin v1.1 is inputing dates into a field with 2 spaces between the date and time and EE is kicking it out stating it’s an incorrect format (manually removing the second space corrects the issue). I’ve got Blind Date v1.2.5 installed which from my understanding will force EE to ‘tolerate’ this.

Wierd thing is if I manually type in the date with two spaces it in between, it works. Since I cannot control the format at which the SAEF Calendar plug puts in the date (OK, I haven’t parsed the PHP yet), but just wondering if this sparks any ideas in anyone.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

That’s strange. I’ve been meaning to update this anyway so that it will throw a more appropriate error message if your date doesn’t parse. I can fix your problem when I do that - I can probably do it over the weekend (I hope!).

       
J.B.'s avatar
J.B.
79 posts
16 years ago
J.B.'s avatar J.B.

If I get a chance, I’ll try to get in and have some output errors to see if I can’t detect the exact problem for more info. New dad here, so time is a bit short as of late.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Congats 😊 I’m expecting my second any day now.

       
J.B.'s avatar
J.B.
79 posts
16 years ago
J.B.'s avatar J.B.

You have time on the weekend with one?

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Hah - not really! “Have time” kind of takes on new meanings with family… It’s more like the twilight zone around here actually. You’d think the second one would mean less work getting ready wouldn’t you?

I think just doing a regex replacing multiple spaces with one should fix your specific problem and that is easy to put in. I really should be scrubbing the data using built-in EE functions and I’m wondering if that in itself might not fix the issue - I’m curious to find out.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

leejb, just out of curiosity, what browser are you using? Have you tried using a different one - do you see the same error?

Here is a new version of the extension. Can you see if this fixes your problem? If it does I’ll post it as a new version to the original post… I haven’t worked on the error output formatting, but wanted to see if this helps your problem.

EDIT: Whoops - I had the regex wrong. Here’s one that should work:

       
J.B.'s avatar
J.B.
79 posts
16 years ago
J.B.'s avatar J.B.

After applying 1.26 I’ve gone through a battery of various format entering and have not been able to get the error to re-occur. Thanks for the great plug and super fast response! BTW.. it was occuring in both IE v7 and Firefox v3.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Glad it worked 😊

       
Luke Hardiman's avatar
Luke Hardiman
109 posts
16 years ago
Luke Hardiman's avatar Luke Hardiman

Hi, I found a couple of undefined variables around line 138 in the ext. file:

$str = $REGX->xss_clean($str);
$recipients = preg_replace("/[;,:\s]+/", ',', $recipients);

I’ve initialised them thusly and everything seems to be working again..

$str = '';
$str = $REGX->xss_clean($str);
$recipients = '';
$recipients = preg_replace("/[;,:\s]+/", ',', $recipients);

Although I’m not sure what they’re there for which is a little worrying 😊

Also I’ve noticed that the top of this thread (no.1 result in google for me) still shows v1.2.5.

Just a heads up.. Cheers for the extension.. US dates are very confusing for us Africans.

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Hi Luke - thanks for finding that. In all honesty those lines of code shouldn’t even be in there (I cut and paste them just for reference while I was adding some code for leejb to fix a problem he identified on the last page. I just forgot to erase them again). They don’t actually do anything at all - I’ve removed them.

Sorry for the sloppy coding. I’ve updated Blind Date to 1.2.7 and added it to the first post of this thread.

Glad you like the extension Luke 😊

       
Ryan 2010's avatar
Ryan 2010
265 posts
16 years ago
Ryan 2010's avatar Ryan 2010

Hi

This plugin looks like what I will need for my project. Thanks for doing this!

I was wondering - how do I go about using this in a SAEF? Are there instructions that I may have missed? Aside from installing it, I don’t know what code to insert in the saef.

Thanks

       
Brian M.'s avatar
Brian M.
529 posts
16 years ago
Brian M.'s avatar Brian M.

Hi Lotenberg - this should work fine in a SAEF, you don’t need to put in any special code. If you’re having issues definitely let me know 😊

       
Ryan 2010's avatar
Ryan 2010
265 posts
16 years ago
Ryan 2010's avatar Ryan 2010

Hi Brian,

If the expiration_field is blank, is there a way to have it filled in with a date?

i.e. entry date: jan 11 06:00

If expiration date is left blank then expiration date would be forced to january 11 11:59PM

thanks

       
First 2 3 4 5 6 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.