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:
Jakub Zych
2026-10-02 18:19:04 +02:00
parent bbb804961e
commit 67d4c7ff13
17 changed files with 719 additions and 32 deletions

View File

@@ -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"];