Refactored duplicated code into setDay()
Added support for Home and End keys in day <input>