Fixed datepicker resetting to default language too quickly.