gpt4 book ai didi

javascript - AnyTime Picker 默认值

转载 作者:行者123 更新时间:2023-11-30 10:53:52 27 4
gpt4 key购买 nike

如何操作 AnyTime Picker 首先生成的值?例如,我有一个带有 AnyTime 的输入字段。当我单击该字段时,它会填充当前时间,我希望它在下一轮时间填充。

最佳答案

尝试更改 anytime.js 的这些行

//  Initialize the picker's date/time value.

try
{
this.time = this.conv.parse(this.inp.val());
this.offMin = this.conv.getUtcParseOffsetCaptured();
this.offSI = this.conv.getUtcParseOffsetSubIndex();
}
catch ( e )
{
this.time = new Date();
}

//  Initialize the picker's date/time value.

try
{
this.time = this.conv.parse(this.inp.val());
this.offMin = this.conv.getUtcParseOffsetCaptured();
this.offSI = this.conv.getUtcParseOffsetSubIndex();
}
catch ( e )
{
this.time = new Date();
this.time.setHours(this.time.getHours()+1,0,0,0);
}

关于javascript - AnyTime Picker 默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3465786/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com