feat(12.2-02): add the datepicker field with server-side bounds and date list columns
- type: datepicker compiles the D-20 keys; format maps to displayFormat with WinterCMS's momentFormat table - boot fails when the mode does not match the column's Go type (time.Time, lagoon.Date, lagoon.TimeOfDay) - datepicker is a writable scalar field; minDate and maxDate are rechecked on save - columns.yaml accepts type: date and type: time; Scanner/Valuer structs are columns, not relations - conformance fixture carries date and datetime fields; README, forms and lists docs
This commit is contained in:
@@ -615,6 +615,9 @@
|
||||
"default": {
|
||||
"$ref": "#/components/schemas/cabana.jsonScalar"
|
||||
},
|
||||
"displayFormat": {
|
||||
"type": "string"
|
||||
},
|
||||
"emptyOption": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -632,6 +635,18 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"firstDay": {
|
||||
"description": "FirstDay is the first day of the week, 0 (Sunday) to 6.",
|
||||
"type": "integer"
|
||||
},
|
||||
"format": {
|
||||
"description": "Format is a datepicker's WinterCMS (PHP date) display format;\nDisplayFormat is the same format in the SPA's moment-style tokens.",
|
||||
"type": "string"
|
||||
},
|
||||
"ignoreTimezone": {
|
||||
"description": "IgnoreTimezone keeps a datetime's wall-clock value with no conversion.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"imageHeight": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -642,6 +657,9 @@
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxDate": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxFiles": {
|
||||
"description": "MaxFiles caps the number of files of an attachMany field.",
|
||||
"type": "integer"
|
||||
@@ -657,8 +675,12 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"minDate": {
|
||||
"description": "MinDate and MaxDate bound a datepicker's calendar date (YYYY-MM-DD),\nchecked again on save.",
|
||||
"type": "string"
|
||||
},
|
||||
"mode": {
|
||||
"description": "Mode is the fileupload mode (image or file, default file).",
|
||||
"description": "Mode is the fileupload mode (image or file, default file) or the\ndatepicker mode (date, datetime or time, default datetime).",
|
||||
"type": "string"
|
||||
},
|
||||
"multiple": {
|
||||
@@ -714,6 +736,10 @@
|
||||
],
|
||||
"description": "ThumbOptions carries the preview thumbnail mode."
|
||||
},
|
||||
"twelveHour": {
|
||||
"description": "TwelveHour shows a 12-hour clock.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -724,6 +750,13 @@
|
||||
"widget": {
|
||||
"description": "Widget is the custom-element tag of a `type: widget` field (D-06).",
|
||||
"type": "string"
|
||||
},
|
||||
"yearRange": {
|
||||
"description": "YearRange is [n] (years either side of today) or [from, to].",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
25
admin/src/api/schema.d.ts
vendored
25
admin/src/api/schema.d.ts
vendored
@@ -2893,15 +2893,26 @@ export interface components {
|
||||
comment?: string;
|
||||
context?: components["schemas"]["cabana.fieldContext"];
|
||||
default?: components["schemas"]["cabana.jsonScalar"];
|
||||
displayFormat?: string;
|
||||
emptyOption?: string;
|
||||
/** @description FileTypes are the allowed lower-case extensions of a fileupload field. */
|
||||
fileTypes?: string[];
|
||||
/** @description Fill lists the fields of the same form the action writes back (D-07). */
|
||||
fill?: string[];
|
||||
/** @description FirstDay is the first day of the week, 0 (Sunday) to 6. */
|
||||
firstDay?: number;
|
||||
/**
|
||||
* @description Format is a datepicker's WinterCMS (PHP date) display format;
|
||||
* DisplayFormat is the same format in the SPA's moment-style tokens.
|
||||
*/
|
||||
format?: string;
|
||||
/** @description IgnoreTimezone keeps a datetime's wall-clock value with no conversion. */
|
||||
ignoreTimezone?: boolean;
|
||||
imageHeight?: number;
|
||||
/** @description ImageWidth and ImageHeight are the preview size of an image upload. */
|
||||
imageWidth?: number;
|
||||
label?: string;
|
||||
maxDate?: string;
|
||||
/** @description MaxFiles caps the number of files of an attachMany field. */
|
||||
maxFiles?: number;
|
||||
/** @description MaxFilesize is the largest accepted file in megabytes. */
|
||||
@@ -2911,7 +2922,15 @@ export interface components {
|
||||
* fileupload field.
|
||||
*/
|
||||
mimeTypes?: string[];
|
||||
/** @description Mode is the fileupload mode (image or file, default file). */
|
||||
/**
|
||||
* @description MinDate and MaxDate bound a datepicker's calendar date (YYYY-MM-DD),
|
||||
* checked again on save.
|
||||
*/
|
||||
minDate?: string;
|
||||
/**
|
||||
* @description Mode is the fileupload mode (image or file, default file) or the
|
||||
* datepicker mode (date, datetime or time, default datetime).
|
||||
*/
|
||||
mode?: string;
|
||||
multiple?: boolean;
|
||||
name: string;
|
||||
@@ -2937,11 +2956,15 @@ export interface components {
|
||||
tab?: string;
|
||||
/** @description ThumbOptions carries the preview thumbnail mode. */
|
||||
thumbOptions?: components["schemas"]["cabana.ThumbOptions"];
|
||||
/** @description TwelveHour shows a 12-hour clock. */
|
||||
twelveHour?: boolean;
|
||||
type: string;
|
||||
/** @description UseCaption lets the admin edit each file's title and description. */
|
||||
useCaption?: boolean;
|
||||
/** @description Widget is the custom-element tag of a `type: widget` field (D-06). */
|
||||
widget?: string;
|
||||
/** @description YearRange is [n] (years either side of today) or [from, to]. */
|
||||
yearRange?: number[];
|
||||
};
|
||||
"cabana.FormMessages": {
|
||||
create: components["schemas"]["cabana.MessageForms"];
|
||||
|
||||
Reference in New Issue
Block a user