A Go templating fix for date inputs that came up blank.
Short answer
In IOTA SDK, date fields on edit pages didn't show the value stored in the database. The date field only rendered its default, and the datetime-local field passed a raw time.Time as an attribute value. The fix uses the stored value when present and formats it in the layout HTML expects. It was merged as PR #1031 and closed issue #340 .
The problem
Issue #340, filed by a maintainer, reported that date fields rendered by the CRUD builder on edit pages "are missing the value that is set in DB", and that the same issue appeared on other pages.
The fix
const dateTimeLocalLayout = "2006-01-02T15:04" . . . if val := mapping . Or ( f . value , f . defaultVal ) ; ! val . IsZero ( ) { attrs [ "value" ] = val . Format ( time . DateOnly ) } . . . if val := mapping . Or ( f . value , f . defaultVal ) ; ! val . IsZero ( ) { attrs [ "value" ] = val .…