3 of 5
3
Blind Date - use human readable dates in the CP & SAEFs
Posted: 31 March 2007 03:31 PM   [ Ignore ]   [ # 37 ]  
Research Assistant
RankRankRank
Total Posts:  845
Joined  08-05-2005

Beautiful. Thanks so much!

Profile
 
 
Posted: 03 April 2007 07:36 AM   [ Ignore ]   [ # 38 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

Yikes! I just realized I had some debug code in there turned on that would cause things to still break. I’ve turned it off and re-uploaded version of 1.2.4 - sorry for the confusion. Please re-download if you’ve got version 1.2.4. Thanks!

Profile
 
 
Posted: 04 May 2007 04:12 PM   [ Ignore ]   [ # 39 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  328
Joined  04-02-2007

Brian, can this handle multiple fields?  IOW can I put in entry_date and expiration_date in the “Punctual to a Fault” option?  If so is it comma separated, need ’ around each field, etc.?

Profile
 
 
Posted: 04 May 2007 04:13 PM   [ Ignore ]   [ # 40 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  328
Joined  04-02-2007

Err.. one more thing.  I’m trying this on a custom date field and when I click a date it still shows the current time and not the time I’m trying to force.  Is this a feature or a bug? :p

Profile
 
 
Posted: 04 May 2007 04:50 PM   [ Ignore ]   [ # 41 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

Yep it will take multiple values for any of the fields in the settings - separate them with |

The way it works is it does its magic during the submission process - so if you’re in the CP and use the calendar, it will show the current time by default,  when you submit it, it will then force that time (or do whatever you have set for that field).  If you go back and edit the field it would then display the correct time. In other words it doesn’t mess with the javascript function that is used for the calendar - it does its stuff when you submit the entry.

Profile
 
 
Posted: 04 May 2007 05:05 PM   [ Ignore ]   [ # 42 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  328
Joined  04-02-2007

Wonderful, thanks!

Profile
 
 
Posted: 15 June 2007 09:11 AM   [ Ignore ]   [ # 43 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  866
Joined  04-14-2007

This extension seems to be what I need to simplify date entry for the SAEF I’m using for an “Events/Calendar” page.

I just installed but seem to be missing something because though my SAEF now accepts all sorts of formatting, Blind Date is not generating want is intended; e.g.
date entered > blind date result
06/25/2007 >  06/24/2007 11:01pm
6/30/2007   >  06/29/2007 11:01pm
07-15-2007 >  08/27/13 11:01pm (it seems to me that the BD ext. does not like “-”)
07/15/2007 >  07/14/2007 11:01pm

The 1hr offset from the default entry time of 12:01am indicates to me a missing setting.
But I’m not sure where that would need to go? Also, the fact that the “-” is accepted but causes oddities it worrisome to me. How can I prevent this from occurring, or generate a formatting error message to prevent the entry from posting?.

I suppose, back to my original intent, is there a way to lock in a simple date format of
MM/DD/YYYY or YYYY/MM/DD - anything else would generate a formatting error message?

Thanks.

 Signature 

Michael Rubens | hothousegraphix
Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that’s creativity. - Charles Mingus

Profile
 
 
Posted: 18 June 2007 08:09 AM   [ Ignore ]   [ # 44 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006
hothousegraphix - 15 June 2007 09:11 AM

This extension seems to be what I need to simplify date entry for the SAEF I’m using for an “Events/Calendar” page.

I just installed but seem to be missing something because though my SAEF now accepts all sorts of formatting, Blind Date is not generating want is intended; e.g.
date entered > blind date result
06/25/2007 >  06/24/2007 11:01pm
6/30/2007   >  06/29/2007 11:01pm
07-15-2007 >  08/27/13 11:01pm (it seems to me that the BD ext. does not like “-”)
07/15/2007 >  07/14/2007 11:01pm

The 1hr offset from the default entry time of 12:01am indicates to me a missing setting.
But I’m not sure where that would need to go? Also, the fact that the “-” is accepted but causes oddities it worrisome to me. How can I prevent this from occurring, or generate a formatting error message to prevent the entry from posting?.

I suppose, back to my original intent, is there a way to lock in a simple date format of
MM/DD/YYYY or YYYY/MM/DD - anything else would generate a formatting error message?

Thanks.

hothousegraphix,

Sorry for the delay - father’s day weekend ended up pretty busy here.

I had a similar situation with the time shift on a server I tested on.  The thing about dates/times entered into the system is that it interacts with settings in many different places.  The server date/time, the localization settings for EE as well as per user, , as well as daylight savings time. Unfortunately I don’t have an exact, “Do this and your problem will be solved,” answer because all blind date does is take the date supplied and apply the PHP function
strtotime to that string. After that happens it is entered into the system, and that is when EE does it’s magic and applies all the localization, daylight savings, etc.

What I did when I encountered the problem was to check the server date/time to make sure it was correct,  the daylight saving setting to make sure that was correct, then individually the localization options for EE, for the user making the post.  I think I ended up having to use the localization override in the localization preferences - the option “Honor the Daylight Saving Time setting associated with each section entry?” - set that to “no”.

Let me know if that helps - if not we can figure something else out.

For the other questions - the formats it will accept is simply up to the strtotime function once again. Here’s more info on what it will and won’t accept:  linky.

At this point EE doesn’t have an extension hook to take over the validation process - so when it encounters something it doesn’t understand it throws the generic error message for a date/time mismatch.  You can go in and modify that text manually if you like, but that language file will probably be over-written when upgrading EE which is why I don’t do it with Blind Date.

At this point there isn’t a way to lock in a specific format required, and really that goes a bit against what I want Blind Date to do. The system itself requires a specific format, at BD removes that requirement (although you’re right, it does break for that style formatting you show, I assume because the US format can and is easily confused with the European format, and there’s no ‘right’ way between the two).

Profile
 
 
Posted: 30 August 2007 09:48 AM   [ Ignore ]   [ # 45 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

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.

Profile
 
 
Posted: 18 September 2008 09:55 AM   [ Ignore ]   [ # 46 ]  
Grad Student
Avatar
Rank
Total Posts:  87
Joined  04-12-2008

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.

 Signature 

“You can’t fall off the floor” - Paul’s Law
“Brawndo, It’s what plants crave!” - Idiocracy

Profile
 
 
Posted: 18 September 2008 10:11 AM   [ Ignore ]   [ # 47 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

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!).

Profile
 
 
Posted: 18 September 2008 09:02 PM   [ Ignore ]   [ # 48 ]  
Grad Student
Avatar
Rank
Total Posts:  87
Joined  04-12-2008

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.

 Signature 

“You can’t fall off the floor” - Paul’s Law
“Brawndo, It’s what plants crave!” - Idiocracy

Profile
 
 
Posted: 19 September 2008 06:53 AM   [ Ignore ]   [ # 49 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

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

Profile
 
 
Posted: 19 September 2008 11:22 AM   [ Ignore ]   [ # 50 ]  
Grad Student
Avatar
Rank
Total Posts:  87
Joined  04-12-2008

You have time on the weekend with one?

 Signature 

“You can’t fall off the floor” - Paul’s Law
“Brawndo, It’s what plants crave!” - Idiocracy

Profile
 
 
Posted: 19 September 2008 02:19 PM   [ Ignore ]   [ # 51 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

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.

Profile
 
 
Posted: 21 September 2008 08:34 AM   [ Ignore ]   [ # 52 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

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:

File Attachments
blind_date_1.2.6.zip  (File Size: 5KB - Downloads: 29)
Profile
 
 
Posted: 22 September 2008 11:48 AM   [ Ignore ]   [ # 53 ]  
Grad Student
Avatar
Rank
Total Posts:  87
Joined  04-12-2008

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.

 Signature 

“You can’t fall off the floor” - Paul’s Law
“Brawndo, It’s what plants crave!” - Idiocracy

Profile
 
 
Posted: 22 September 2008 01:09 PM   [ Ignore ]   [ # 54 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  780
Joined  07-18-2006

Glad it worked smile

Profile
 
 
   
3 of 5
3
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64939 Total Logged-in Users: 65
Total Topics: 81912 Total Anonymous Users: 36
Total Replies: 440330 Total Guests: 279
Total Posts: 522242    
Members ( View Memberlist )