Add 12 hour AM/PM support. Track input change

Add 12 hour AM/PM support, using options based on timeentry by @kbwood (https://github.com/kbwood/timeentry).

Also track input change with new event handler inputChange. Factor out setting time from input into new setTime function.