Update ps-input-time.js

set default date to min or max instead of now if available. and cleaned up code.