Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#6 | 1507786-jstimer-views-6.patch | 1.28 KB | rickmanelius |
#3 | jstimer-views-date-formatter1.png | 53.07 KB | rickmanelius |
#3 | jstimer-views-date-formatter2.png | 44.72 KB | rickmanelius |
#3 | jstimer-views-date-formatter3.png | 11.85 KB | rickmanelius |
Comments
Comment #1
jvandervort CreditAttribution: jvandervort commentedAre 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?
Comment #2
TimelessDomain CreditAttribution: TimelessDomain commentedThe 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.
Comment #3
rickmanelius CreditAttribution: rickmanelius commentedHi @jvandervort,
Here are some screen shots.
I don't know how extensive the edits would be, but I'm imagining the code can largely be sourced from the date module.
Comment #4
rickmanelius CreditAttribution: rickmanelius commentedIf I provide a patch for this functionality, will it get committed? I need to try and turn this around by next Monday :)
Comment #5
jvandervort CreditAttribution: jvandervort commentedSure, if it looks good.
Comment #6
rickmanelius CreditAttribution: rickmanelius commentedHi @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 :)
Comment #7
gmclelland CreditAttribution: gmclelland commented@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.
Comment #8
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedComment #10
jvandervort CreditAttribution: jvandervort commented