mmikkel / DashCols-Craft

Easily add custom fields to index tables in Craft CMS
MIT License
56 stars 4 forks source link

Date Format #4

Closed samhibberd closed 9 years ago

samhibberd commented 9 years ago

Would be great if you could format the display of the date field, but by default i think it should be the same as postDate?

ps Nice Plugin!!

mmikkel commented 9 years ago

Thanks for the kind words, much appreciated.

I've been meaning to improve the date/time output somehow, yeah. I don't know if formatting it exactly like postDate is the way to go - for starters I think the DashCols columns should include the time.

At some point I think DashCols will need to offer field formatting options - the Date/Time FieldType is a really good example where this would be a huge benefit. As long as the plugin uses the built-in Field Layout Designer - which, in all it's simplistic glory, is fairly limited - I'm not really sure how best to approach something like that, though. I might roll my own layout designer at some point, but not for a good while.

In the meantime, I'd be happy to hear people's suggestions for a decent, one-size-fits-most Date/Time format.

samhibberd commented 9 years ago

Would it be possible to provide date, time, or date / time based on the date field settings?

http://cl.ly/image/3b3s0z1W2O2E

mmikkel commented 9 years ago

Probably, though I'm pretty sure stuff like that would require fetching the actual field as well as the field data and I'm a little worried about overhead. It's definitely on the agenda, though.

mmikkel commented 9 years ago

Date/time columns now display date and/or time based on field settings – no performance hit.

Thanks for the suggestion @samhibberd :+1: