Empty date not possible?
Opened this issue · 3 comments
I'm trying to work out how to provide an empty date to this library.
The only way that I can see of doing that is to write a custom attribute that provides value, and gives it as a formatted string.
I tried to do similar with a Nullable DateTime but Fable doesn't support Nullable (I've just found your issue in Fable for that).
Is there something I am missing, or is that the only way? If so I can make a PR for DateTime option and apply my logic in that overload.
Hi there @Jmaharman, to be honest, it has been ages since I've touched this code so if you could give it a try it be great! You are saying that it resets the date when the input is an empty string? Then maybe you can add a function that takes DateTime option
and pass empty string when None
or pass the DateTime
instance when it is available, what do you think?
Sorry for the slow reply, been a crazy week. I’ve basically done what you asked above locally, it’ll clone this repo and push my overload when I get a second on the laptop.
No rush @Jmaharman, I will be happy to merge and publish a new version as soon as it lands 😄