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:
@@ -114,9 +114,9 @@ func (s CRUDService) commitDeferred(ctx context.Context, tx *gorm.DB, cc *Compil
|
||||
}
|
||||
switch {
|
||||
case cf.required && n == 0:
|
||||
details[cf.name] = []string{fileMessage(ctx, s.tr, "required", cf.name, nil)}
|
||||
details[cf.name] = []string{fieldMessage(ctx, s.tr, "required", cf.name, nil)}
|
||||
case cf.relation.Many && cf.maxFiles > 0 && n > int64(cf.maxFiles):
|
||||
details[cf.name] = []string{fileMessage(ctx, s.tr, "max.array", cf.name, map[string]string{"max": strconv.Itoa(cf.maxFiles)})}
|
||||
details[cf.name] = []string{fieldMessage(ctx, s.tr, "max.array", cf.name, map[string]string{"max": strconv.Itoa(cf.maxFiles)})}
|
||||
}
|
||||
}
|
||||
if len(details) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user