Fix date formatting and event handling.