🎨 When "Default fill created time" is enabled for database date fields, the automatically filled time value is incorrect https://github.com/siyuan-note/siyuan/issues/15828

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-09-13 09:44:59 +08:00
parent 370601d277
commit 7faf981b69
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 19 additions and 11 deletions

View file

@ -1201,7 +1201,7 @@ func (r *ValueRollup) calcContents(calc *RollupCalc, destKey *Key) {
}
}
func GetAttributeViewDefaultValue(valueID, keyID, blockID string, typ KeyType) (ret *Value) {
func GetAttributeViewDefaultValue(valueID, keyID, blockID string, typ KeyType, keyDateAutoFill bool) (ret *Value) {
if "" == valueID {
valueID = ast.NewNodeID()
}
@ -1227,7 +1227,7 @@ func GetAttributeViewDefaultValue(valueID, keyID, blockID string, typ KeyType) (
case KeyTypeNumber:
ret.Number = &ValueNumber{}
case KeyTypeDate:
ret.Date = &ValueDate{IsNotTime: true}
ret.Date = &ValueDate{IsNotTime: !keyDateAutoFill}
case KeyTypeSelect:
ret.MSelect = []*ValueSelect{}
case KeyTypeMSelect: