Skip to content

Date/time fields

Use the date/time fields to allow users to set dates, saved as Firestore timestamps.

You can choose between using dates or date/time fields. Also you can create read-only fields that get updated automatically when entities are created or updated

The data type is date.

Internally the component used is DateTimeFieldBinding.

Field

import { buildProperty } from "@firecms/core";
buildProperty({
dataType: "date",
name: "Expiry date",
mode: "date"
});

Field

import { buildProperty } from "@firecms/core";
buildProperty({
dataType: "date",
name: "Arrival time",
mode: "date_time"
});
import { buildProperty } from "@firecms/core";
buildProperty({
dataType: "date",
name: "Created at",
autoValue: "on_create"
});
import { buildProperty } from "@firecms/core";
buildProperty({
dataType: "date",
name: "Updated at",
autoValue: "on_update"
});