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!
精彩评论