使用 cakephp 设置自动时间输入的时间范围

发布于 2024-10-30 16:59:39 字数 498 浏览 3 评论 0原文

我正在为一家餐厅创建预订表格。除了一个细节之外,一切都悬而未决:我想将时间输入的时间范围限制为商店的营业时间,但我在谷歌或此处找不到任何内容。假设我想将时间限制在下午 5 点至晚上 11 点。怎么办?

这就是我到目前为止所得到的。首先输入时间。

<div id="secondLine">
We'll be there at <?php echo $form->input('bookingTime', array('selected' => '19:30:00', 'interval' => '15', )); ?> on the <?php echo $form->input('bookingDate', array('dateFormat' => 'DMY', 'separator' => '', 'minYear' => '2011')); ?>
</div>

谢谢!

〜哈雷

I'm creating a booking form for a restaurant. It's all sussed except for one detail: I want to limit the time range of the time inputs to the opening hours of the store, yet I haven't been able to find anything on google or here. Say I want to limit it from 5pm-11pm. How do?

This is what I've got so far. The time input is first.

<div id="secondLine">
We'll be there at <?php echo $form->input('bookingTime', array('selected' => '19:30:00', 'interval' => '15', )); ?> on the <?php echo $form->input('bookingDate', array('dateFormat' => 'DMY', 'separator' => '', 'minYear' => '2011')); ?>
</div>

Thanks!

~Harley

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文