There is no overlap between date types with Deserialize and FromFormField
Existing Functionality
I want to include a field in an entity for recording the date of a monetary transaction. FromFormField is implemented on PrimitiveDateTime but not DateTime. Deserialize/Serialize is implemented on DateTime but not PrimitiveDateTime. FromFormField is implemented on Date but Deserialize/Serialize is not.
This is quite frustrating for me.
Suggested Changes
Is there a way to get one of those types to be implemented on both FromFormField Deserialize/Serialize?
You can create a newtype around PrimitiveDateTime or DateTime, the one you prefer the most, and manually implement both of these traits yourself. Or you simply use both and do an explicit conversion when appropriate. I'll need a bit more context if you want more precise help.
It looks like PrimitiveDateTime now implements (de)serialize! So this was passively fulfilled.