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
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
  • Home
  • Forums

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

Development and Programming

metadaptive's avatar
metadaptive
96 posts
16 years ago
metadaptive's avatar metadaptive

Hey Brian,

Thanks for this - I really appreciate you taking the time to help me out - I know what it’s like when work + family devour all that time there used to be for doing other stuff…

will try this out over the weekend and get back to you - as I say no huge rush from my end so don’t stress it.

cheers again

meta

       
metadaptive's avatar
metadaptive
96 posts
16 years ago
metadaptive's avatar metadaptive

Brian,

debug output is below:

Field Name: entry_date Time Given: 2009-12-24 11:41 Timestamp: 1261676460 Date from Timestamp: 2009-12-24 11:41:00 AM

Field Name: expiration_date Time Given: 2009-12-24 11:41 Timestamp: 1261676460 Date from Timestamp: 2009-12-24 11:41:00 AM

Also I just redownloaded the non-debug version from the link on the 1st page of this thread. installed it and noticed that it reports as version 1.2.7 rather than the 1.3 on the zip file. Is that correct?

cheers for your help mate

Tom

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

Hi Tom - you’re right that was 1.2.7 in the original post. I’ve fixed that so the file is now 1.3 on the 1st page.

Tom I”m going to go to PMs so we can work through this without having to keep bumping the thread.

Thanks!

       
Brandon C.'s avatar
Brandon C.
43 posts
16 years ago
Brandon C.'s avatar Brandon C.

This may have already been asked, and if so I apologize, but I was wondering if there was a way to retroactively update dates in the system? My client has been adding calendar entries and the time stamps are breaking the functionality. I found your plugin today and, while it works perfectly on new entries added, the old ones are still incorrect. I may have to go correct them by hand, but I figured I’d check first to see if its a possibility.

Thanks!

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

Sorry Brandon - this extension won’t do what you need :(

       
Brandon C.'s avatar
Brandon C.
43 posts
16 years ago
Brandon C.'s avatar Brandon C.

No problem, I didn’t think so. It’ll help going forward though, so thanks for that.

       
Shane Robinson's avatar
Shane Robinson
55 posts
16 years ago
Shane Robinson's avatar Shane Robinson

Thanks SO MUCH for this Extension, Brian!! Had to build a SAEF for an event calendar today and was trying to jump through all sorts of hoops with jQuery to properly format jQuery UI Calendar Picker Widget input into an entry_date field. Your Extension solved ALL my problems!!

       
leadsuccess's avatar
leadsuccess
408 posts
16 years ago
leadsuccess's avatar leadsuccess

This is a very good extension, thanks for creating it!

One thing I want to know is there a way to limit it to just certain weblogs. I have events and the only true thing I need Blind Date for. I did not see anything in the settings but maybe I can hack the extension. I do need a little direction of how difficult it would be to make it specific to one weblog and where to find it in the code.

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

Right now it applies to everything. You would need to add an option to the settings page, and then check for that vs which weblog you’re posting into. I don’t have the time to add to or modify this extension, but you’re welcome to do so - if you do it would be great if you could share what you’ve added. Thanks dvancouver.

       
Jim Pannell's avatar
Jim Pannell
187 posts
16 years ago
Jim Pannell's avatar Jim Pannell

Hi Brian

For some reason Blind Date isn’t working for me right now with my SAEF. I’m getting the following error:

The following date isn’t in a recognizable format. Please change the syntax and try again: 30/05/2009

It’s a perfectly okay european date format.

Does Blind Date not accept the following format? 30/06/2009

Cheers

Jim

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

Blind Date relies on the PHP function strtotime() to work its magic. The strtotime function says this:

“The function expects to be given a string containing a US English date format and will try to parse that format into a Unix timestamp…”

I think the problem comes in because with that format it can’t be sure what you’re asking for: 6/9/09 and 9/6/09 can be the same date or different dates, depending on where you’re from.

Doing some research it looks like it is possible to pull in a timezone into the function and use that in the calculation, but I currently don’t do that and it requires PHP 5+ which I am hesitant to require. I’m not sure it would cure your problem even if we supplied that. Try this - if you add on your three letter timezone code at the end of the date, does it work? So for me it would be:

06/30/2009 EST (That’s for Eastern Standard Time).

I believe there are three letter codes for all time zones, not just US ones?

       
Jim Pannell's avatar
Jim Pannell
187 posts
16 years ago
Jim Pannell's avatar Jim Pannell

Hi Brian

Many thanks for getting back to me so fast. I’ve actually changed the format that the date picker uses to be dd-mm-yyyy and it’s working great!

Issue solved.

Cheers and have a great weekend.

Jim

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

You too 😊

       
leadsuccess's avatar
leadsuccess
408 posts
about 16 years ago
leadsuccess's avatar leadsuccess

I am wondering if any thought has been given to adding a by weblog setting?

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

At this point I’m in a holding pattern with this - I don’t really have any time to put into it. You’re welcome to add anything to it you like and if it doesn’t have a backdoor to Fort Knox or something I’d put it into the public version.

I really should make it less confusing to use, but I was initially waiting for 2.0 to come out to see if this would all be made redundant anyway…

       
First 5 6 7 8

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.