nexusfallout / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
0 stars 0 forks source link

Time added to the Date Custom Field #308

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What functionality do you want to see?

- A way to include time in the date custom field 

(A more general solution might be to add a time custom field rather than adding 
time to the custom date field. Either solution would work for my needs, 
although date / time makes more sense to me. )

Do you have examples of similar functionality on other sites or in other 
plugins? (Please share URLs below)

- This may have been requested before.  See: 
https://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id
=5

Please provide any additional information below.

As far as implementation, a drop-down may work as long as we can define the 
time intervals.  For my existing need, half-hour increments are fine.

Original issue reported on code.google.com by zellopar...@gmail.com on 31 Jan 2012 at 5:53

GoogleCodeExporter commented 8 years ago
See this: http://trentrichardson.com/examples/timepicker/ -- easy to implement, 
but I'm not sold on the slider interface for hours and minutes... but there are 
a LOT of various interfaces out there.

Original comment by ever...@fireproofsocks.com on 15 Feb 2012 at 1:59

GoogleCodeExporter commented 8 years ago
Agree on the slider interface. Probably not the best UI for this.

Original comment by michaelg...@gmail.com on 20 Feb 2012 at 7:09

GoogleCodeExporter commented 8 years ago
Can you recommend a different one?  It seems that ALL the interfaces I've seen 
for this use the slider or something even more clunky... go go google.... 
suggestions welcome.

Original comment by ever...@fireproofsocks.com on 20 Feb 2012 at 7:11

GoogleCodeExporter commented 8 years ago
This is pretty clean: http://labs.perifer.se/timedatepicker/  very simple 
though.... 
http://jquerybyexample.blogspot.com/2011/12/jquery-timepicker-plugin-demo.html

this one is ok: http://web-profile.com.ua/jquery/plugins/jquery-timepicker/

This one looks like more of what I had in mind: 
http://razum.si/jQuery-calendar/TimeCalendar.html

http://www.ama3.com/anytime/

Original comment by ever...@fireproofsocks.com on 22 Feb 2012 at 6:23

GoogleCodeExporter commented 8 years ago
The one you had in mind has the advantage of integrating time and date selector 
into one U.I.  That's nice.  The others look like they'd satisfy my needs as 
well.

Here's another I stumbled upon that I'd like you to look at:

http://keith-wood.name/timeEntry.html 

It only addresses the time component, but it looks very flexible and still be 
easy for the end user to use. 

Original comment by griffism...@gmail.com on 22 Feb 2012 at 5:15

GoogleCodeExporter commented 8 years ago
Ugh... I'm surprised no one has something better.  As Steve Jobs might have 
said: "These are all shit."  Sigh.  I'm gonna go with 
http://razum.si/jQuery-calendar/TimeCalendar.html when I have some time -- its 
CSS is all jittery though.

Original comment by ever...@fireproofsocks.com on 22 Feb 2012 at 6:39

GoogleCodeExporter commented 8 years ago
Works for me.

Original comment by griffism...@gmail.com on 22 Feb 2012 at 7:35

GoogleCodeExporter commented 8 years ago
Ok, I have a version of this with a handful of formats on the dev branch: 

Committed revision 538726.

This will go out in version 0.9.5.12.  Someone really needs to write a cleaner 
version of this though.  I envision an extension of the jQuery datepicker that 
can accept any of the standard date formatting characters (see 
http://php.net/manual/en/function.date.php).  This would probably be a bit 
inefficient because JS is not known for its regex abilities, but it'd be nice 
to have the formatting flexibility.

Original comment by ever...@fireproofsocks.com on 1 May 2012 at 11:16

GoogleCodeExporter commented 8 years ago
Maddening: WordPress booted CCTM out of their repo because that bit of 
Javascript had a Creative Commons license.  It was crappy code to begin with, 
but it wasn't even used in its original or full state.  So I need to rewrite 
that so it's done correctly (internationalized etc.) before this can be closed 
out.

Original comment by ever...@fireproofsocks.com on 18 May 2012 at 6:41

GoogleCodeExporter commented 8 years ago
That's a shame. But thanks for the update.

Original comment by michaelg...@gmail.com on 20 May 2012 at 5:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Yeah, it's really frustrating.  Here's the datetime.js attached.  You should be 
able to drop this into your custom-content-type-manager/js folder and it'll get 
picked up.

Original comment by ever...@fireproofsocks.com on 21 May 2012 at 4:31

Attachments:

GoogleCodeExporter commented 8 years ago
I've used this one on another project and it works well and is sensibly 
formatted: http://pttimeselect.sourceforge.net/

Implementing it would require that datetime fields get split into 2 separate 
fields (one for date, one for time) and then reassembled as values are saved... 
kinda janky, but there's no simple workaround if the library doesn't natively 
support datetimes.  The other problem with this is that special tpls would have 
to be used, and only certain date formats could be supported -- i.e. only 
formats where we could intelligently split the value into its date and time 
components (probably would only implement the MySQL standard Y-m-d H:i:s or the 
universal time code using a "T" to delineate the parts).

Original comment by ever...@fireproofsocks.com on 31 Dec 2012 at 7:03

GoogleCodeExporter commented 8 years ago

Original comment by ever...@fireproofsocks.com on 31 Dec 2012 at 7:04

GoogleCodeExporter commented 8 years ago
Will refactor in Github.

Original comment by ever...@fireproofsocks.com on 11 May 2015 at 4:34