如果时间 < 10:00:00
.value = Format(dt, "t") '显示为空值...如果时间 >= 10:00:00,能正常显示
.value = Format(dt, "HH:mm") '显示正常
代码如下:
Select Case e.Path
Case "test.htm"
Dim wb As New weui
wb.AddForm("","form1","test.htm")
Dim dt As Date = "2019-11-05 08:08:08"
With wb.AddInputGroup("form1","ipg1","时间输入")
.AddInput("xm","日期","date").Value = Format(dt,"yyyy-MM-dd")
With .AddInput("xm","时间","time")
.value = Format(dt, "t")
.Min = "08:00" '输入的事件必须在8:00到12:00之间
.Max = "12:00"
End With
With .AddInput("xm","日期时间","datetime-local")
.Value = Format(dt,"yyyy-MM-ddTHH:mm") '留意一下这个格式,日期和时间之间用字母T隔开
.Readonly = True
End With
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build) '生成网页
End Select
[此贴子已经被作者于2019/11/5 10:40:31编辑过]