Right now if you have a "to date" it will display the date as "[DATE-START-COUNTDOWN] until to [DATE-END-COUNTDOWN] until"

There should be an option to disable the the end date or start date, so just one countdown counter is displayed per date field

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jvandervort’s picture

Are you saying you can't change the field format spec?

Go to "admin/structure/types/manage" choose your type with the date field.
Choose the "manage display" tab.
Choose the "configure" button on the right.
Change the "Format of the timer: " field to be whatever you want to display.

If not, I'm not quite getting the question? Any chance of a screen shot?

TimelessDomain’s picture

The problem occurs in views. You can put in a custom format timer, but you cannot select whether the format should display which to/from dates.
I ended up switching to http://drupal.org/project/jquery_countdown since this hid the to date by default.

rickmanelius’s picture

Hi @jvandervort,

Here are some screen shots.

  • The first one shows the default date formatting options.
  • The second one shows the JS Timer date formatting options. Note the ability to target just the start OR the end time.
  • The third shows the output of the JS timer module. Basically we have 2 timers going when only one is really necessary (at least for some use cases).

I don't know how extensive the edits would be, but I'm imagining the code can largely be sourced from the date module.

rickmanelius’s picture

If I provide a patch for this functionality, will it get committed? I need to try and turn this around by next Monday :)

jvandervort’s picture

Sure, if it looks good.

rickmanelius’s picture

Hi @jvandervort. I had to get something up that was a quick and dirty hack simply to meet the deadline, but I'm also leaving this as a patch in case anyone else needs it in the short term. Basically the current module will look to see if there is an end date and then format as well. What I did is simply comment that out and ONLY use the start date. Again, I know there are going to be use cases where someone does want both and it's better to let them set that in views... so I'm not posting this for consideration as much as a starting point :)

gmclelland’s picture

@rickmanelius - Thanks for the patch. I ran into the same situation where my countdown timer was printing twice because views was using the date field from and to dates. This at least gets me a fix in the mean time.

SocialNicheGuru’s picture

Issue summary: View changes
Status: Active » Needs review

jvandervort’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.