angular - 如何仅在角度 5 或 6 中创建时间选择器?
问题描述
我必须从给定的时间段中选择特定的时间。从日历中选择日期后,将显示可供预约的时间段。
解决方案
Bootstrap DateTime Picker中有一个。
哪个具有您需要的确切组件。
<div class="input-append date" id="datetimepicker"
data-date="12-02-2012" data-date-format="hh">
<input class="span2" size="16" type="text" value="12-02-2012">
<span class="add-on"><i class="icon-th"></i></span>
</div>
像这样调用它:$('#datetimepicker').datetimepicker('remove')
您可以使用PrimeNG 日历。
import {CalendarModule} from 'primeng/calendar';
它有timeOnly
只显示时间选择器的参数。
<p-calendar [(ngModel)]="date8" [timeOnly]="true"></p-calendar>
推荐阅读
- regex - 正则表达式可以断言 2 个子匹配相等吗?
- f# - FSharp.Data:CssSelect 无法按预期工作
- python - 无法在 windows7 机器上的 Tensorflow 1.5 中使用急切执行
- javascript - 如何检查复选框是否被选中?
- c# - 面板移动时面板内图片框的边界不更新
- javascript - 为什么以这种方式交换字符有效的 JavaScript?
- amazon-web-services - Amazon S3 或 Lambda 是否默认缓存文件或数据?如何关闭它?
- javascript - 如果最后一个文本框有值光标焦点移动到按钮
- c - 任务是计算圆周运动的两个物体之间的直线距离
- agora.io - 无法设置 Agora 录音 SDK