Closed (fixed)
Project:
Timeline
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2007 at 01:33 UTC
Updated:
1 Sep 2009 at 22:30 UTC
is it possible to customize the time format on event strt and end into the timeline popup ? I mean i get always something like:
Sun, 20 Oct 2002 00:00:00 GMT
Tue, 31 Dec 2002 00:00:00 GMT
i would like only dd/MM/yy and no time for example...
maybe i would liek to set the italian format, but this is the second step..
someone can help on formatting ?
Comments
Comment #1
fm commentedI haven't figured out how to reformat the time & date. However, in timeline/api/bundle.css you can add a visibility property to the .timeline-event-bubble-time class.
Change from ...
to ...
Comment #2
wrb123 commentedSolution (slightly modified post from http://groups.google.com/group/simile-widgets/browse_thread/thread/1d1af...):
Works in D6 (with Timeline 1.2 i think)
1. open modules/timeline/api/bundle.js
2. MAKE A COPY of bundle.js and save it somewhere in case you modify something and need an original to revert back to.
3. search for, or look around line 4247 for the following text/code (may be different for you if you have a different version): fillTime:function
4. replace the code here:
with this code:
5. save bundle.js
6. refresh timeline, clear cache, etc. to see changes
The lines you should pay particular attention to if you want to try to hack this even more, are:
if you switch (fStart.getMonth()+1) with fStart.getDate(), that will reverse the display of the Month or Date being first (11/30/2008 vs 30/11/2008). you can change "/" to "." if youd rather see "11.30.2008" instead of "11/30/2008"
Make sure you preserve Start and End variables in those two lines... don't mix up the one line which is for start date and the other which is for end date, i would just change them both accordingly. my events only have one date and i still changed both just in case, because it's easy and will allow me to have an end date in the future if i want, without trying to remember how i did this in the first place.
also, my bundle.js has: fillTime:function(elmt,labeller){
if yours has different variables instead of "elmt" and "labeller" inside the parenthesis, then in the following code above youll need to replace all instances of elmt with whatever your first variable is (______, ) and labeller with whatever your second variable is ( ,______)
-Bill
Comment #3
xamanu commentedI would hide the whole dates via CSS:
and then theme and configure the dates and their format via the cck date fields and views.