开发者

CakePHP: Time input with quarter-accuracy

I'm using

$form->input("time")

to 开发者_如何学编程render select boxes for time input. They have minute-accuracy, which I don't need.

How could I limit the select lists to quarters (XX:00, XX:15, XX:30, XX:45)?


Here's how to do it:

   <?php echo $form->input('time', array('type' => 'time', 'interval' => 15)); ?>


This URL might help you: http://book.cakephp.org/view/189/Automagic-Form-Elements#options-interval-757

I hope this helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜