ng-ytl-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
33 lines (30 loc) • 810 B
text/typescript
import { Component } from '@angular/core';
export class NzDemoTimePickerDisabledOptionsComponent {
_date = null;
newArray = (start, end) => {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
};
disabledHours = () => {
const hours = this.newArray(0, 60);
hours.splice(20, 4);
return hours;
};
disabledMinutes = (h) => {
if (h === 20) {
return this.newArray(0, 31);
} else if (h === 23) {
return this.newArray(30, 60);
}
return [];
};
}