flamelink / flamelink-js-sdk

🦊 Official Flamelink JavaScript SDK for both the Firebase Realtime database and Cloud Firestore
https://flamelink.github.io/flamelink-js-sdk
MIT License
43 stars 5 forks source link

Send a Timestamp with the Content API to populate a Date field #165

Closed leeprobert closed 2 years ago

leeprobert commented 3 years ago

I have a Date field in my content and am using the API to create Documents. I need to send a Timestamp through the Flamelink SDK/API and into Firebase. The Timestamp looks just great in Firestore but when Flamelink tries to parse it as a Date it crashes the field. How do I get Flamelink to see the Timestamp as a Date? Is it just a String?

leeprobert commented 3 years ago

I've raised a Stack ticket for this too: https://stackoverflow.com/questions/67353882/flamelink-send-timestamp-with-the-content-api

Alternatively, it would be great to add the content metadata fields to the overview table, so we can sort on fields like creationDate. We are using the Flamelink CMS as a moderation tool for the data in Firestore, so sorting on the date of creation is critical.

gitdubz commented 2 years ago

Hi @leeprobert

We have added a Timestamp field a while ago for Firestore to the schema builder. You can have a look when editing a schema.

image

Sorting on Create and Update date is also available when toggling the options in the overview

image image