jQuery移动端输入时间带步

jQuery mobile input time with step

本文关键字:时间 输入 移动 jQuery      更新时间:2023-09-26

我想有一个jQuery移动输入时间与一个预定义的步骤秒。这可能吗?

现在我有:

<input id="schedule" type="time" name="open_hours">

我想添加一个参数,我可以设置分钟为步骤。例如,我只想让用户在每个可能的小时中只选择00或30分钟。

你可以使用jQuery UI的spinner,并将step选项设置为30

http://jqueryui.com/spinner/时间

他们在那个例子中创建了一个时间穿线器,这正是你想要的。