I have an instance where a value is null. Is there a way to set when the date is null?
Please provide more info, why you need this, what is yout use case?
I have some forms with date fields. For an "empty" form, this field is null. What I want to do is to have a date picker that shows nothing or a placeholder like input controls.
At the moment, I get an error when the value is null so I use moment(). The concern however is that it is not possible to know whether the value is actually set or not since the picker always displays something.
Fields like dateOfBirth and dateJoined appear to have values when the value is actually null.
isn't the same as this one?
https://github.com/Hacker0x01/react-datepicker/issues/962
Not really sure but in the current version, passing null as date does not throw exceptions so this issue is fixed.
Most helpful comment
I have some forms with date fields. For an "empty" form, this field is null. What I want to do is to have a date picker that shows nothing or a placeholder like input controls.
At the moment, I get an error when the value is null so I use
moment(). The concern however is that it is not possible to know whether the value is actually set or not since the picker always displays something.Fields like dateOfBirth and dateJoined appear to have values when the value is actually null.