solution https://stackoverflow.com/questions/57594076/throwing-error-rangeerror-invalid-time-value-while-setting-custom-date-to-datep