Imported code from http://www.eyecon.ro/bootstrap-datepicker/