Date & Time: review r3 fixes

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 13:17:52 -04:00
1 parent 6601c90b16
commit e3eaef7437
8 files changed
+70 -7

No files matched your search

+3 -2
View File
@@ -102,11 +102,12 @@ func DatePicker(c *ui.Context, value *Date, opts DatePickerOptions) DateTimeResu
if placeholder == "" {
placeholder = msg(c, "date_picker.placeholder")
}
var field *ui.Element
var field, input *ui.Element
col.Children(func() {
field = datetimeField(c, ui.Row(c), *problem != "", opts.ReadOnly)
field.Children(func() {
in := textInputEditor(c, field, text, opts.ReadOnly, ui.TextInputBase).Grow(1).Shrink(1).Placeholder(placeholder).FontFeatures("tnum")
input = in
label := opts.Label
if label == "" {
label = placeholder
@@ -149,7 +150,7 @@ func DatePicker(c *ui.Context, value *Date, opts DatePickerOptions) DateTimeResu
})
datetimeError(c, *problem)
})
return DateTimeResult{Element: col, changed: changed}
return DateTimeResult{Element: col, Input: input, changed: changed}
}
// datePickerProblem explains why an existing day d cannot be chosen, or returns "".