ra-data-firebase-client icon indicating copy to clipboard operation
ra-data-firebase-client copied to clipboard

DateTimeInput values cannot be saved

Open deathemperor opened this issue 3 years ago • 1 comments

DateInput works fine but DateTimeInput cannot be saved, the field is missing in firebase.

If there's a pre-defined field, it will be removed.

The Posts in the example can be used for reproduction.

deathemperor avatar Mar 24 '21 02:03 deathemperor

The issue is value returned from DateTimeInput is an object and cannot be saved to firebase. Converting it to string is a workaround.

<DateTimeInput
  source="joinable_at"
  parse={(v) => v.toString()}
  required
/>

deathemperor avatar Mar 24 '21 14:03 deathemperor