Update time selection to avoid reseting time.
Add support for IE >= 8.