Improvements to date selection

Some changes to datetimesel, so that's it possible to give minimum/maximum date instead of just year. This is currently in the form of a unix timestamp, but should perhaps be a DateTime object instead? But DateTime objects seem a bit harder to create (constuctor only takes a string?).
Also fix an issue with event finishing time being silently changed.