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.
39 lines
649 B
TypeScript
39 lines
649 B
TypeScript
3 months ago
|
import type { CollectionConfig } from "payload";
|
||
|
|
||
|
export const Holiday: CollectionConfig = {
|
||
|
slug: "holiday",
|
||
|
access: {
|
||
|
read: () => true,
|
||
|
},
|
||
|
admin: {
|
||
|
useAsTitle: "title",
|
||
|
},
|
||
|
fields: [
|
||
|
{
|
||
|
name: "title",
|
||
|
type: "text",
|
||
|
localized: true,
|
||
|
},
|
||
|
{
|
||
|
name: "from",
|
||
|
type: "date",
|
||
|
admin: {
|
||
|
date: {
|
||
|
pickerAppearance: "dayOnly",
|
||
|
displayFormat: "d MMM yyy",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
name: "to",
|
||
|
type: "date",
|
||
|
admin: {
|
||
|
date: {
|
||
|
pickerAppearance: "dayOnly",
|
||
|
displayFormat: "d MMM yyy",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
};
|