• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / 0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

04 Sep 2023 08:40AM UTC coverage: 15.616% (-74.6%) from 90.2%
0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

Pull #2829

circleci

cmm-va
fix: add test
Pull Request #2829: fix: add tabIndex

300 of 6386 branches covered (0.0%)

Branch coverage included in aggregate %.

78 of 78 new or added lines in 26 files covered. (100.0%)

2849 of 13779 relevant lines covered (20.68%)

83.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

27.27
/src/date-range/optional-dates/optional-dates.component.ts
1
import { Component, OnInit } from '@angular/core';
2
import { DateRangeItemInfo } from '../date-range.class';
3
import { ThyPopover } from 'ngx-tethys/popover';
4
import { FormsModule } from '@angular/forms';
5
import { ThyRangePickerDirective } from 'ngx-tethys/date-picker';
6
import { ThyIconComponent } from 'ngx-tethys/icon';
7
import {
8
    ThyDropdownMenuComponent,
9
    ThyDropdownMenuItemDirective,
10
    ThyDropdownMenuItemNameDirective,
11
    ThyDropdownMenuItemExtendIconDirective
12
} from 'ngx-tethys/dropdown';
13
import { NgIf, NgFor } from '@angular/common';
1✔
14

15
/**
×
16
 * @private
×
17
 */
×
18
@Component({
19
    // eslint-disable-next-line @angular-eslint/component-selector
20
    selector: 'date-range-optional',
21
    templateUrl: './optional-dates.component.html',
×
22
    standalone: true,
×
23
    imports: [
×
24
        NgIf,
25
        ThyDropdownMenuComponent,
26
        NgFor,
×
27
        ThyDropdownMenuItemDirective,
28
        ThyDropdownMenuItemNameDirective,
29
        ThyDropdownMenuItemExtendIconDirective,
30
        ThyIconComponent,
31
        ThyRangePickerDirective,
32
        FormsModule
×
33
    ]
34
})
1✔
35
export class OptionalDateRangesComponent implements OnInit {
36
    hiddenMenu = false;
37

38
    optionalDateRanges: DateRangeItemInfo[];
1✔
39

40
    customValue = '自定义';
41

42
    customKey: string;
43

44
    minDate: number | Date;
45

46
    maxDate: number | Date;
47

48
    disabledDate: (d: Date) => boolean;
49

50
    selectedDateRange: (date: DateRangeItemInfo) => void;
51

52
    calendarChange: (date: Date[]) => void;
53

54
    selectedDate: DateRangeItemInfo;
55

56
    constructor(private thyPopover: ThyPopover) {}
57

58
    ngOnInit() {}
59

60
    _selectDateRange(dateRange: DateRangeItemInfo) {
61
        this.selectedDate = dateRange;
62
        this.selectedDateRange(dateRange);
63
        this.thyPopover.close();
64
    }
65

66
    _selectedCustomDate(date: DateRangeItemInfo) {
67
        this.selectedDate = {
68
            begin: date.begin,
69
            end: date.end,
70
            key: this.customKey,
71
            text: this.customValue
72
        };
73
        this.selectedDateRange(this.selectedDate);
74
    }
75
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc