You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
693 B
TypeScript

import type { CollectionConfig } from "payload";
export const Holiday: CollectionConfig = {
slug: "holiday",
access: {
read: () => true,
},
admin: {
useAsTitle: "title",
},
fields: [
{
name: "title",
type: "text",
localized: true,
required: true,
},
{
name: "from",
type: "date",
admin: {
date: {
pickerAppearance: "dayOnly",
displayFormat: "d MMM yyy",
},
},
required: true,
},
{
name: "to",
type: "date",
admin: {
date: {
pickerAppearance: "dayOnly",
displayFormat: "d MMM yyy",
},
},
},
],
};