Search

A new Extension, “Field: Date and Time” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

This extension adds a new field to Symphony that allows the addition of single dates, multiple dates and date ranges. See demo.

Screenshot

Field: Date and Time

Sample XML

<calendar>
    <date timeline="2" type="exact">
        <start iso="2009-08-21T09:46:00+02:00" time="09:46" weekday="5" offset="+0200">2009-08-21</start>
    </date>
    <date timeline="1" type="range">
        <start iso="2009-08-20T09:23:00+02:00" time="09:23" weekday="4" offset="+0200">2009-08-20</start>
        <end iso="2009-08-29T10:07:00+02:00" time="10:07" weekday="6" offset="+0200">2009-08-29</end>
    </date>
    <date timeline="3" type="exact">
        <start iso="2009-08-22T10:00:00+02:00" time="10:00" weekday="6" offset="+0200">2009-08-22</start>
    </date>
</calendar>

Tips

  • Click Add new date to (yes!) add a new date.
  • The field accepts relative dates like yesterday, today, tomorrow or now. More options can be found in the datejs documentation (great library by the way).
  • Click the date, from or end handles to drag and reorder dates.
  • Select a start date and hold down alt while selecting an end date.
  • To see the start date in the calendar select the from date. To see the end date in the calendar select the to date.
  • Setting an end time without specifying a day range will create a time range on the same day.
  • Setting the end date to a date before the start will switch both values.
  • Ranges can be adjusted by just holding down the alt key and reselecting the start or end date (works similar to file selection in Finder).
  • The timeline attribute in the data source output returns the “order in time” based on the start date.

Dates can be sorted manually for data source output, but data source filtering is not yet possible. If anyone knows how to build some decent SQL statements for data source filtering, I’d be glad to implement these. (working as of version 1.1)

This extension is based on and inspired by Scott Hughes’ calendar mock-up and Rowan Lewis’ calendar overlay.

This is a masterpiece.

Would be super-cool to have filtering as well.

Fantastic. Always count on Nils for Teh Awesomez.

Thanks!

Would be super-cool to have filtering as well.

Yes, I know. I just don’t know how to handle the different ranges and - well – how to create appropriate SQL statements for this task.

Just added some more information in the first post.

Brilliant…

And another one! fantastic

Thanks Nils, this is amazing, perfect for an Events section I’ll be creating soon.

These art historians with their obsessions about dates and image management, what would we do without them?

What would we do without them?

Being unorganized? :)

Would be super-cool to have filtering as well.

Besides filtering, grouping would be a good thing, too.
Has anyone an idea how to best handle entry grouping based on date ranges? If an event entry is repeated for each day in its range, the XML may become quite long.

Nils! Thank you! Very, very nice!

Awesome!

Repeating fields. That would be very handy for other things, like related links, multiple phone numbers, multiple emails, multiple file uploads – things where a section link would be overkill. The add button should be an option on fields.

Hook it up to a section link and you could add / edit categories on the entry edit screen.

Nils is a Symphony ninja! :-)

Version 1.0.2

I just added data source sorting which will use starting dates as reference.

Very cool, Nils!

this is another good one, nils! one suggestion - when you have a date range already, and you’re in to field of a date range, would it be possible to not have to do an alt + click? or does that make it more complicated than it should be?

I think this might complicate the logic of the field because it won’t behave consistently anymore, don’t you think?

I’m not entirely sure. I mean, if you have a to field, you know which state you are in already. when you don’t hold down alt and just click instead, it drops the to field and makes it a from field, which I think is a little confusing.

I can understand if you only have a from field displaying and the need to hold down alt. I feel like if you keep behavior consistent and have a to field and hold down alt + click, it would add another to field.

Version 1.1

I think I managed to set up data source filtering.

  • Filter by single date: the field date has to match the filter or the filter has to be in the field’s date range.
  • Filter by date range: the field date has to be in the filter range or the field’s date range has to overlap the filter range

New version can be found on GitHub.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details