You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function_toMillis(options: Object,key: string){constdateVal=options[key];// Is it a Date object?if(typeofdateVal==='object'&&typeofdateVal.getMonth==='function'){options[key]=dateVal.getTime();}}
if (typeof dateVal === 'object' && typeof dateVal.getMonth === 'function') doesn't block when dateVal is null. Cause typeof null is object (wtf!?)
Reproducible Demo
I can provide a reproducible demo, but I want first to have your opinion about the issue I described above.
Thank you
The text was updated successfully, but these errors were encountered:
Environment
Description
Problem: when no minDate is provided, the DatePickerAndroid won't open because of this error:
For info, I use react-native-modal-datetime-picker, itself using DatePickerAndroid.
Cause
See the _toMillis function below.
if (typeof dateVal === 'object' && typeof dateVal.getMonth === 'function')
doesn't block whendateVal
isnull
. Causetypeof null
isobject
(wtf!?)Reproducible Demo
I can provide a reproducible demo, but I want first to have your opinion about the issue I described above.
Thank you
The text was updated successfully, but these errors were encountered: