在Angular中动态创建从00:00:00到23:30:00的时间(与时间格式HH::mm:ss相差半小时)
Dynamically create time from 00:00:00 to 23:30:00( half hour difference with time format HH::mm:ss) in Angular
我正在动态设置时间下拉列表,格式为 (HH:mm:ss),从 00:00:00 到 23:30:00。有什么方法可以得到这个时间格式。非常感谢 Linq 查询。
预期结果- 00:00:00、00:30:00、01:00:00、01:30:00 到 11:30:00
enter image description here
我为此使用了 Kendo 时间选择器,它确实具有格式。
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<div class="example-wrapper">
<p>Select a date:</p>
<kendo-timepicker
[format]="'HH:mm:ss'"
[steps]="steps"
[value]="value"
></kendo-timepicker>
<p>(↑ to increment and ↓ to decrement the value)</p>
</div>
`
})
export class AppComponent {
public steps: any = { hour: 0, minute: 30, second: 00 };
public value: Date = new Date(2000, 2, 10, 10, 30);
}
了解更多信息:检查此 link:https://www.telerik.com/kendo-angular-ui/components/dateinputs/timepicker/incremental-steps/
我正在动态设置时间下拉列表,格式为 (HH:mm:ss),从 00:00:00 到 23:30:00。有什么方法可以得到这个时间格式。非常感谢 Linq 查询。
预期结果- 00:00:00、00:30:00、01:00:00、01:30:00 到 11:30:00
enter image description here
我为此使用了 Kendo 时间选择器,它确实具有格式。
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<div class="example-wrapper">
<p>Select a date:</p>
<kendo-timepicker
[format]="'HH:mm:ss'"
[steps]="steps"
[value]="value"
></kendo-timepicker>
<p>(↑ to increment and ↓ to decrement the value)</p>
</div>
`
})
export class AppComponent {
public steps: any = { hour: 0, minute: 30, second: 00 };
public value: Date = new Date(2000, 2, 10, 10, 30);
}
了解更多信息:检查此 link:https://www.telerik.com/kendo-angular-ui/components/dateinputs/timepicker/incremental-steps/