Well, I made date field for my event content type and put To Date required.

First, why I can't determine (custom) format for To Date? I need to do it, because I want to show ---> "klo 10:00 7.11. - 10.12.2008".

And second, for that I need to set From Date to "\k\l\o G:i j.n." and when I do it, view shows it like "10:10 7.11."!

If I try "(\k\l\o G:i) j.n." then it shows "(klo 10:00) 7.11. (klo) - ...etc."! (I tried to make separate datefield for To Date)

It does so because there's still To Date showing, althought To Date has no numbers to show!

---
toni

Comments

valokettu’s picture

Also when putting "j.n." it shows "10.11 - 7.12", which means that dot is missing..

karens’s picture

Status: Active » Closed (won't fix)

The custom format is mostly designed for normal date format strings and you've added all kinds of special characters. And, although several people have worked on the regex to get it working better at handling odd characters, I'm not sure I can make it smart enough to handle every possible character you might add. It's not as straightforward as it might seem because I have to be able to strip out all characters that relate to specific granularity elements, like removing everything, including punctuation, associated with the 'seconds' in a date format if the date isn't supposed to include seconds. We're also trying to collapse the information from a 'from' and 'to' date into a single element, which again means I have to figure out which parts of the format relate to the date elements that are being removed. It's very complex, and will only work if you mostly stick to the normal kinds of format characters and punctuation.

If you're pushing past the things the code can handle correctly, you'll have to do this in your theme instead. You can override the main date combo theme and add whatever formatting you want to the date there. It looks like you mostly want to add a prefix to the formatted date, so I would change the custom format to leave the prefix out and add the prefix in the theme.