More correct fix for NaN instead of dates and months names when wrong data placed in input field