最近在做小程序中,其中自带的时间选择器没有秒数,所以上网查了很多方法,但是跟我的想法不同,所以根据其他人的,自己写了我自己的方法。
wxml文件中定义输入框
<
view
class
=
"section">
<
picker
mode
=
"multiSelector"
value
=
"{
{startTime}}"
bindchange
=
"startTimeChange"
bindcolumnchange
=
"startTimeColumn"
range
=
"{
{startTimeArray}}">
<
view
class
=
"picker">
<
view
class
=
"top grid">
<
label
class
=
"title col-0">
开始时间
</
label
>
<
input
class
=
"input_base input_h30 col-1"
name
=
"startTime"
value
=
"{
{startTimeArray[0][startTime[0]]}}:{
{startTimeArray[1][startTime[1]]}}:{
{startTimeArray[2][startTime[2]]}}"></
input
>
</
view
>
</