@imihai/angular-datetime-picker 21.0.0 → 21.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/style/picker.min.css +1 -0
- package/fesm2022/imihai-angular-datetime-picker.mjs +5845 -0
- package/fesm2022/imihai-angular-datetime-picker.mjs.map +1 -0
- package/imihai-angular-datetime-picker-21.0.2.tgz +0 -0
- package/package.json +33 -77
- package/types/imihai-angular-datetime-picker.d.ts +2193 -0
- package/.browserslistrc +0 -9
- package/.editorconfig +0 -13
- package/.eslintrc.js +0 -208
- package/.github/workflows/ci_test.yml +0 -35
- package/.prettierrc +0 -2
- package/.travis.yml +0 -16
- package/LICENSE +0 -22
- package/README.md +0 -194
- package/angular.json +0 -221
- package/e2e/protractor.conf.js +0 -28
- package/e2e/src/app.e2e-spec.ts +0 -14
- package/e2e/src/app.po.ts +0 -11
- package/e2e/tsconfig.e2e.json +0 -13
- package/projects/picker/karma.conf.js +0 -62
- package/projects/picker/ng-package.json +0 -7
- package/projects/picker/package.json +0 -28
- package/projects/picker/src/lib/date-time/adapter/date-time-adapter.class.ts +0 -313
- package/projects/picker/src/lib/date-time/adapter/date-time-format.class.ts +0 -18
- package/projects/picker/src/lib/date-time/adapter/luxon-date-time-adapter.class.ts +0 -307
- package/projects/picker/src/lib/date-time/adapter/luxon-date-time-format.class.ts +0 -11
- package/projects/picker/src/lib/date-time/adapter/luxon-date-time.module.ts +0 -31
- package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.ts +0 -356
- package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.ts +0 -14
- package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time.module.ts +0 -26
- package/projects/picker/src/lib/date-time/calendar-body.component.html +0 -38
- package/projects/picker/src/lib/date-time/calendar-body.component.scss +0 -0
- package/projects/picker/src/lib/date-time/calendar-body.component.spec.ts +0 -120
- package/projects/picker/src/lib/date-time/calendar-body.component.ts +0 -190
- package/projects/picker/src/lib/date-time/calendar-month-view.component.html +0 -47
- package/projects/picker/src/lib/date-time/calendar-month-view.component.scss +0 -16
- package/projects/picker/src/lib/date-time/calendar-month-view.component.spec.ts +0 -394
- package/projects/picker/src/lib/date-time/calendar-month-view.component.ts +0 -705
- package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.html +0 -44
- package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.scss +0 -0
- package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.spec.ts +0 -343
- package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.ts +0 -465
- package/projects/picker/src/lib/date-time/calendar-year-view.component.html +0 -16
- package/projects/picker/src/lib/date-time/calendar-year-view.component.scss +0 -0
- package/projects/picker/src/lib/date-time/calendar-year-view.component.spec.ts +0 -381
- package/projects/picker/src/lib/date-time/calendar-year-view.component.ts +0 -549
- package/projects/picker/src/lib/date-time/calendar.component.html +0 -169
- package/projects/picker/src/lib/date-time/calendar.component.scss +0 -0
- package/projects/picker/src/lib/date-time/calendar.component.spec.ts +0 -592
- package/projects/picker/src/lib/date-time/calendar.component.ts +0 -496
- package/projects/picker/src/lib/date-time/date-time-inline.component.html +0 -1
- package/projects/picker/src/lib/date-time/date-time-inline.component.scss +0 -4
- package/projects/picker/src/lib/date-time/date-time-inline.component.ts +0 -365
- package/projects/picker/src/lib/date-time/date-time-picker-animation-event.ts +0 -4
- package/projects/picker/src/lib/date-time/date-time-picker-container.component.html +0 -126
- package/projects/picker/src/lib/date-time/date-time-picker-container.component.scss +0 -0
- package/projects/picker/src/lib/date-time/date-time-picker-container.component.ts +0 -631
- package/projects/picker/src/lib/date-time/date-time-picker-input.directive.ts +0 -851
- package/projects/picker/src/lib/date-time/date-time-picker-intl.service.ts +0 -76
- package/projects/picker/src/lib/date-time/date-time-picker-trigger.directive.ts +0 -88
- package/projects/picker/src/lib/date-time/date-time-picker.component.html +0 -0
- package/projects/picker/src/lib/date-time/date-time-picker.component.scss +0 -0
- package/projects/picker/src/lib/date-time/date-time-picker.component.spec.ts +0 -2648
- package/projects/picker/src/lib/date-time/date-time-picker.component.ts +0 -731
- package/projects/picker/src/lib/date-time/date-time.class.ts +0 -256
- package/projects/picker/src/lib/date-time/date-time.module.ts +0 -61
- package/projects/picker/src/lib/date-time/numberedFixLen.pipe.ts +0 -28
- package/projects/picker/src/lib/date-time/options-provider.ts +0 -44
- package/projects/picker/src/lib/date-time/timer-box.component.html +0 -79
- package/projects/picker/src/lib/date-time/timer-box.component.scss +0 -0
- package/projects/picker/src/lib/date-time/timer-box.component.ts +0 -175
- package/projects/picker/src/lib/date-time/timer.component.html +0 -58
- package/projects/picker/src/lib/date-time/timer.component.scss +0 -0
- package/projects/picker/src/lib/date-time/timer.component.spec.ts +0 -399
- package/projects/picker/src/lib/date-time/timer.component.ts +0 -371
- package/projects/picker/src/lib/dialog/dialog-config.class.ts +0 -220
- package/projects/picker/src/lib/dialog/dialog-container.component.html +0 -1
- package/projects/picker/src/lib/dialog/dialog-container.component.scss +0 -0
- package/projects/picker/src/lib/dialog/dialog-container.component.ts +0 -231
- package/projects/picker/src/lib/dialog/dialog-ref.class.ts +0 -178
- package/projects/picker/src/lib/dialog/dialog.module.ts +0 -25
- package/projects/picker/src/lib/dialog/dialog.service.ts +0 -353
- package/projects/picker/src/lib/utils/array.utils.ts +0 -12
- package/projects/picker/src/lib/utils/constants.ts +0 -59
- package/projects/picker/src/lib/utils/date.utils.ts +0 -97
- package/projects/picker/src/lib/utils/index.ts +0 -5
- package/projects/picker/src/lib/utils/object.utils.ts +0 -29
- package/projects/picker/src/public_api.ts +0 -56
- package/projects/picker/src/sass/picker.scss +0 -743
- package/projects/picker/src/test-helpers.ts +0 -125
- package/projects/picker/src/test.ts +0 -52
- package/projects/picker/tsconfig.lib.json +0 -18
- package/projects/picker/tsconfig.lib.prod.json +0 -7
- package/projects/picker/tsconfig.spec.json +0 -17
- package/projects/picker/tslint.json +0 -8
- package/src/app/app.component.html +0 -77
- package/src/app/app.component.scss +0 -32
- package/src/app/app.component.spec.ts +0 -16
- package/src/app/app.component.ts +0 -35
- package/src/assets/.gitkeep +0 -0
- package/src/environments/environment.prod.ts +0 -3
- package/src/environments/environment.ts +0 -16
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -14
- package/src/karma.conf.js +0 -31
- package/src/main.ts +0 -16
- package/src/polyfills.ts +0 -53
- package/src/styles.scss +0 -7
- package/src/test.ts +0 -50
- package/src/tsconfig.app.json +0 -16
- package/src/tsconfig.spec.json +0 -18
- package/src/tslint.json +0 -17
- package/tsconfig.base.json +0 -29
- package/tsconfig.json +0 -30
- package/tslint.json +0 -130
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* date-time-inline.component
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
ChangeDetectionStrategy,
|
|
7
|
-
ChangeDetectorRef,
|
|
8
|
-
Component, EventEmitter,
|
|
9
|
-
forwardRef,
|
|
10
|
-
Inject,
|
|
11
|
-
Input,
|
|
12
|
-
OnInit,
|
|
13
|
-
Optional,
|
|
14
|
-
Output,
|
|
15
|
-
ViewChild
|
|
16
|
-
} from '@angular/core';
|
|
17
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
18
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
19
|
-
import {
|
|
20
|
-
OwlDateTime,
|
|
21
|
-
PickerMode,
|
|
22
|
-
PickerType,
|
|
23
|
-
SelectMode
|
|
24
|
-
} from './date-time.class';
|
|
25
|
-
import { DateTimeAdapter } from './adapter/date-time-adapter.class';
|
|
26
|
-
import {
|
|
27
|
-
OWL_DATE_TIME_FORMATS,
|
|
28
|
-
OwlDateTimeFormats
|
|
29
|
-
} from './adapter/date-time-format.class';
|
|
30
|
-
import { OwlDateTimeContainerComponent } from './date-time-picker-container.component';
|
|
31
|
-
|
|
32
|
-
export const OWL_DATETIME_VALUE_ACCESSOR: any = {
|
|
33
|
-
provide: NG_VALUE_ACCESSOR,
|
|
34
|
-
useExisting: forwardRef(() => OwlDateTimeInlineComponent),
|
|
35
|
-
multi: true
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
@Component({
|
|
39
|
-
selector: 'owl-date-time-inline',
|
|
40
|
-
templateUrl: './date-time-inline.component.html',
|
|
41
|
-
styleUrls: ['./date-time-inline.component.scss'],
|
|
42
|
-
host: {
|
|
43
|
-
'[class.owl-dt-inline]': 'owlDTInlineClass'
|
|
44
|
-
},
|
|
45
|
-
standalone: false,
|
|
46
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
47
|
-
preserveWhitespaces: false,
|
|
48
|
-
providers: [OWL_DATETIME_VALUE_ACCESSOR]
|
|
49
|
-
})
|
|
50
|
-
export class OwlDateTimeInlineComponent<T> extends OwlDateTime<T>
|
|
51
|
-
implements OnInit, ControlValueAccessor {
|
|
52
|
-
@ViewChild(OwlDateTimeContainerComponent, { static: true })
|
|
53
|
-
container: OwlDateTimeContainerComponent<T>;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Set the type of the dateTime picker
|
|
57
|
-
* 'both' -- show both calendar and timer
|
|
58
|
-
* 'calendar' -- show only calendar
|
|
59
|
-
* 'timer' -- show only timer
|
|
60
|
-
*/
|
|
61
|
-
private _pickerType: PickerType = 'both';
|
|
62
|
-
@Input()
|
|
63
|
-
get pickerType(): PickerType {
|
|
64
|
-
return this._pickerType;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
set pickerType(val: PickerType) {
|
|
68
|
-
if (val !== this._pickerType) {
|
|
69
|
-
this._pickerType = val;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
private _disabled = false;
|
|
74
|
-
@Input()
|
|
75
|
-
get disabled(): boolean {
|
|
76
|
-
return !!this._disabled;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
set disabled(value: boolean) {
|
|
80
|
-
this._disabled = coerceBooleanProperty(value);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
private _selectMode: SelectMode = 'single';
|
|
84
|
-
@Input()
|
|
85
|
-
get selectMode() {
|
|
86
|
-
return this._selectMode;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
set selectMode(mode: SelectMode) {
|
|
90
|
-
if (
|
|
91
|
-
mode !== 'single' &&
|
|
92
|
-
mode !== 'range' &&
|
|
93
|
-
mode !== 'rangeFrom' &&
|
|
94
|
-
mode !== 'rangeTo'
|
|
95
|
-
) {
|
|
96
|
-
throw Error('OwlDateTime Error: invalid selectMode value!');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
this._selectMode = mode;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/** The date to open the calendar to initially. */
|
|
103
|
-
private _startAt: T | null;
|
|
104
|
-
@Input()
|
|
105
|
-
get startAt(): T | null {
|
|
106
|
-
if (this._startAt) {
|
|
107
|
-
return this._startAt;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (this.selectMode === 'single') {
|
|
111
|
-
return this.value || null;
|
|
112
|
-
} else if (
|
|
113
|
-
this.selectMode === 'range' ||
|
|
114
|
-
this.selectMode === 'rangeFrom'
|
|
115
|
-
) {
|
|
116
|
-
return this.values[0] || null;
|
|
117
|
-
} else if (this.selectMode === 'rangeTo') {
|
|
118
|
-
return this.values[1] || null;
|
|
119
|
-
} else {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
set startAt(date: T | null) {
|
|
125
|
-
this._startAt = this.getValidDate(
|
|
126
|
-
this.dateTimeAdapter.deserialize(date)
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/** The date to open for range calendar. */
|
|
131
|
-
private _endAt: T | null;
|
|
132
|
-
@Input()
|
|
133
|
-
get endAt(): T | null {
|
|
134
|
-
if (this._endAt) {
|
|
135
|
-
return this._endAt;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (this.selectMode === 'single') {
|
|
139
|
-
return this.value || null;
|
|
140
|
-
} else if (
|
|
141
|
-
this.selectMode === 'range' ||
|
|
142
|
-
this.selectMode === 'rangeFrom'
|
|
143
|
-
) {
|
|
144
|
-
return this.values[1] || null;
|
|
145
|
-
} else {
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
set endAt(date: T | null) {
|
|
151
|
-
this._endAt = this.getValidDate(
|
|
152
|
-
this.dateTimeAdapter.deserialize(date)
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
private _dateTimeFilter: (date: T | null) => boolean;
|
|
157
|
-
@Input('owlDateTimeFilter')
|
|
158
|
-
get dateTimeFilter() {
|
|
159
|
-
return this._dateTimeFilter;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
set dateTimeFilter(filter: (date: T | null) => boolean) {
|
|
163
|
-
this._dateTimeFilter = filter;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/** The minimum valid date. */
|
|
167
|
-
private _min: T | null;
|
|
168
|
-
|
|
169
|
-
get minDateTime(): T | null {
|
|
170
|
-
return this._min || null;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
@Input('min')
|
|
174
|
-
set minDateTime(value: T | null) {
|
|
175
|
-
this._min = this.getValidDate(this.dateTimeAdapter.deserialize(value));
|
|
176
|
-
this.changeDetector.markForCheck();
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/** The maximum valid date. */
|
|
180
|
-
private _max: T | null;
|
|
181
|
-
|
|
182
|
-
get maxDateTime(): T | null {
|
|
183
|
-
return this._max || null;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
@Input('max')
|
|
187
|
-
set maxDateTime(value: T | null) {
|
|
188
|
-
this._max = this.getValidDate(this.dateTimeAdapter.deserialize(value));
|
|
189
|
-
this.changeDetector.markForCheck();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
private _value: T | null;
|
|
193
|
-
@Input()
|
|
194
|
-
get value() {
|
|
195
|
-
return this._value;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
set value(value: T | null) {
|
|
199
|
-
value = this.dateTimeAdapter.deserialize(value);
|
|
200
|
-
value = this.getValidDate(value);
|
|
201
|
-
this._value = value;
|
|
202
|
-
this.selected = value;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
private _values: (T | null)[] = [];
|
|
206
|
-
@Input()
|
|
207
|
-
get values() {
|
|
208
|
-
return this._values;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
set values(values: (T | null)[]) {
|
|
212
|
-
if (values && values.length > 0) {
|
|
213
|
-
values = values.map(v => {
|
|
214
|
-
v = this.dateTimeAdapter.deserialize(v);
|
|
215
|
-
v = this.getValidDate(v);
|
|
216
|
-
return v ? this.dateTimeAdapter.clone(v) : null;
|
|
217
|
-
});
|
|
218
|
-
this._values = [...values];
|
|
219
|
-
this.selecteds = [...values];
|
|
220
|
-
} else {
|
|
221
|
-
this._values = [];
|
|
222
|
-
this.selecteds = [];
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Emits selected year in multi-year view
|
|
228
|
-
* This doesn't imply a change on the selected date.
|
|
229
|
-
* */
|
|
230
|
-
@Output()
|
|
231
|
-
yearSelected = new EventEmitter<T>();
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Emits selected month in year view
|
|
235
|
-
* This doesn't imply a change on the selected date.
|
|
236
|
-
* */
|
|
237
|
-
@Output()
|
|
238
|
-
monthSelected = new EventEmitter<T>();
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Emits selected date
|
|
242
|
-
* */
|
|
243
|
-
@Output()
|
|
244
|
-
dateSelected = new EventEmitter<T>();
|
|
245
|
-
|
|
246
|
-
private _selected: T | null;
|
|
247
|
-
get selected() {
|
|
248
|
-
return this._selected;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
set selected(value: T | null) {
|
|
252
|
-
this._selected = value;
|
|
253
|
-
this.changeDetector.markForCheck();
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
private _selecteds: T[] = [];
|
|
257
|
-
get selecteds() {
|
|
258
|
-
return this._selecteds;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
set selecteds(values: T[]) {
|
|
262
|
-
this._selecteds = values;
|
|
263
|
-
this.changeDetector.markForCheck();
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
get opened(): boolean {
|
|
267
|
-
return true;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
get pickerMode(): PickerMode {
|
|
271
|
-
return 'inline';
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
get isInSingleMode(): boolean {
|
|
275
|
-
return this._selectMode === 'single';
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
get isInRangeMode(): boolean {
|
|
279
|
-
return (
|
|
280
|
-
this._selectMode === 'range' ||
|
|
281
|
-
this._selectMode === 'rangeFrom' ||
|
|
282
|
-
this._selectMode === 'rangeTo'
|
|
283
|
-
);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
get owlDTInlineClass(): boolean {
|
|
287
|
-
return true;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
private onModelChange: Function = () => { };
|
|
291
|
-
private onModelTouched: Function = () => { };
|
|
292
|
-
|
|
293
|
-
constructor(
|
|
294
|
-
protected changeDetector: ChangeDetectorRef,
|
|
295
|
-
@Optional() protected dateTimeAdapter: DateTimeAdapter<T>,
|
|
296
|
-
@Optional()
|
|
297
|
-
@Inject(OWL_DATE_TIME_FORMATS)
|
|
298
|
-
protected dateTimeFormats: OwlDateTimeFormats
|
|
299
|
-
) {
|
|
300
|
-
super(dateTimeAdapter, dateTimeFormats);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
public ngOnInit() {
|
|
304
|
-
this.container.picker = this;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
public writeValue(value: any): void {
|
|
308
|
-
if (this.isInSingleMode) {
|
|
309
|
-
this.value = value;
|
|
310
|
-
this.container.pickerMoment = value;
|
|
311
|
-
} else {
|
|
312
|
-
this.values = value;
|
|
313
|
-
this.container.pickerMoment = this._values[
|
|
314
|
-
this.container.activeSelectedIndex
|
|
315
|
-
];
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
public registerOnChange(fn: any): void {
|
|
320
|
-
this.onModelChange = fn;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
public registerOnTouched(fn: any): void {
|
|
324
|
-
this.onModelTouched = fn;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
public setDisabledState(isDisabled: boolean): void {
|
|
328
|
-
this.disabled = isDisabled;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
public select(date: T[] | T): void {
|
|
332
|
-
if (this.disabled) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
if (Array.isArray(date)) {
|
|
337
|
-
this.values = [...date];
|
|
338
|
-
} else {
|
|
339
|
-
this.value = date;
|
|
340
|
-
}
|
|
341
|
-
this.onModelChange(date);
|
|
342
|
-
this.onModelTouched();
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Emits the selected year in multi-year view
|
|
347
|
-
* */
|
|
348
|
-
public selectYear(normalizedYear: T): void {
|
|
349
|
-
this.yearSelected.emit(normalizedYear);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Emits selected month in year view
|
|
354
|
-
* */
|
|
355
|
-
public selectMonth(normalizedMonth: T): void {
|
|
356
|
-
this.monthSelected.emit(normalizedMonth);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* Emits the selected date
|
|
361
|
-
* */
|
|
362
|
-
public selectDate(normalizedDate: T): void {
|
|
363
|
-
this.dateSelected.emit(normalizedDate);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
[cdkTrapFocus]="picker.pickerMode !== 'inline'"
|
|
3
|
-
class="owl-dt-container-inner"
|
|
4
|
-
>
|
|
5
|
-
@if (pickerType === 'both' || pickerType === 'calendar') {
|
|
6
|
-
<owl-date-time-calendar
|
|
7
|
-
class="owl-dt-container-row"
|
|
8
|
-
[firstDayOfWeek]="picker.firstDayOfWeek"
|
|
9
|
-
[(pickerMoment)]="pickerMoment"
|
|
10
|
-
[selected]="picker.selected"
|
|
11
|
-
[selecteds]="picker.selecteds"
|
|
12
|
-
[selectMode]="picker.selectMode"
|
|
13
|
-
[minDate]="picker.minDateTime"
|
|
14
|
-
[maxDate]="picker.maxDateTime"
|
|
15
|
-
[dateFilter]="picker.dateTimeFilter"
|
|
16
|
-
[startView]="picker.startView"
|
|
17
|
-
[yearOnly]="picker.yearOnly"
|
|
18
|
-
[showCalendarWeeks]="picker.showCalendarWeeks"
|
|
19
|
-
[multiyearOnly]="picker.multiyearOnly"
|
|
20
|
-
[hideOtherMonths]="picker.hideOtherMonths"
|
|
21
|
-
(yearSelected)="picker.selectYear($event)"
|
|
22
|
-
(monthSelected)="picker.selectMonth($event)"
|
|
23
|
-
(dateClicked)="picker.selectDate($event)"
|
|
24
|
-
(selectedChange)="dateSelected($event)"
|
|
25
|
-
></owl-date-time-calendar>
|
|
26
|
-
}
|
|
27
|
-
@if (pickerType === 'both' || pickerType === 'timer') {
|
|
28
|
-
<owl-date-time-timer
|
|
29
|
-
class="owl-dt-container-row"
|
|
30
|
-
[pickerMoment]="pickerMoment"
|
|
31
|
-
[minDateTime]="picker.minDateTime"
|
|
32
|
-
[maxDateTime]="picker.maxDateTime"
|
|
33
|
-
[showSecondsTimer]="picker.showSecondsTimer"
|
|
34
|
-
[hour12Timer]="picker.hour12Timer"
|
|
35
|
-
[stepHour]="picker.stepHour"
|
|
36
|
-
[stepMinute]="picker.stepMinute"
|
|
37
|
-
[stepSecond]="picker.stepSecond"
|
|
38
|
-
(selectedChange)="timeSelected($event)"
|
|
39
|
-
></owl-date-time-timer>
|
|
40
|
-
}
|
|
41
|
-
@if (picker.isInRangeMode) {
|
|
42
|
-
<div
|
|
43
|
-
role="radiogroup"
|
|
44
|
-
class="owl-dt-container-info owl-dt-container-row"
|
|
45
|
-
>
|
|
46
|
-
<div
|
|
47
|
-
role="radio"
|
|
48
|
-
[tabindex]="activeSelectedIndex === 0 ? 0 : -1"
|
|
49
|
-
[attr.aria-checked]="activeSelectedIndex === 0"
|
|
50
|
-
class="owl-dt-control owl-dt-container-range owl-dt-container-from"
|
|
51
|
-
[ngClass]="{
|
|
52
|
-
'owl-dt-container-info-active': activeSelectedIndex === 0,
|
|
53
|
-
}"
|
|
54
|
-
(click)="handleClickOnInfoGroup($event, 0)"
|
|
55
|
-
(keydown)="handleKeydownOnInfoGroup($event, to, 0)"
|
|
56
|
-
#from
|
|
57
|
-
>
|
|
58
|
-
<span
|
|
59
|
-
class="owl-dt-control-content owl-dt-container-range-content"
|
|
60
|
-
tabindex="-1"
|
|
61
|
-
>
|
|
62
|
-
<span class="owl-dt-container-info-label"
|
|
63
|
-
>{{ fromLabel }}:</span
|
|
64
|
-
>
|
|
65
|
-
<span class="owl-dt-container-info-value">{{
|
|
66
|
-
fromFormattedValue
|
|
67
|
-
}}</span>
|
|
68
|
-
</span>
|
|
69
|
-
</div>
|
|
70
|
-
<div
|
|
71
|
-
role="radio"
|
|
72
|
-
[tabindex]="activeSelectedIndex === 1 ? 0 : -1"
|
|
73
|
-
[attr.aria-checked]="activeSelectedIndex === 1"
|
|
74
|
-
class="owl-dt-control owl-dt-container-range owl-dt-container-to"
|
|
75
|
-
[ngClass]="{
|
|
76
|
-
'owl-dt-container-info-active': activeSelectedIndex === 1,
|
|
77
|
-
}"
|
|
78
|
-
(click)="handleClickOnInfoGroup($event, 1)"
|
|
79
|
-
(keydown)="handleKeydownOnInfoGroup($event, from, 1)"
|
|
80
|
-
#to
|
|
81
|
-
>
|
|
82
|
-
<span
|
|
83
|
-
class="owl-dt-control-content owl-dt-container-range-content"
|
|
84
|
-
tabindex="-1"
|
|
85
|
-
>
|
|
86
|
-
<span class="owl-dt-container-info-label"
|
|
87
|
-
>{{ toLabel }}:</span
|
|
88
|
-
>
|
|
89
|
-
<span class="owl-dt-container-info-value">{{
|
|
90
|
-
toFormattedValue
|
|
91
|
-
}}</span>
|
|
92
|
-
</span>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
}
|
|
96
|
-
@if (showControlButtons) {
|
|
97
|
-
<div class="owl-dt-container-buttons owl-dt-container-row">
|
|
98
|
-
<button
|
|
99
|
-
class="owl-dt-control owl-dt-control-button owl-dt-container-control-button"
|
|
100
|
-
type="button"
|
|
101
|
-
tabindex="0"
|
|
102
|
-
(click)="onCancelClicked($event)"
|
|
103
|
-
>
|
|
104
|
-
<span
|
|
105
|
-
class="owl-dt-control-content owl-dt-control-button-content"
|
|
106
|
-
tabindex="-1"
|
|
107
|
-
>
|
|
108
|
-
{{ cancelLabel }}
|
|
109
|
-
</span>
|
|
110
|
-
</button>
|
|
111
|
-
<button
|
|
112
|
-
class="owl-dt-control owl-dt-control-button owl-dt-container-control-button"
|
|
113
|
-
type="button"
|
|
114
|
-
tabindex="0"
|
|
115
|
-
(click)="onSetClicked($event)"
|
|
116
|
-
>
|
|
117
|
-
<span
|
|
118
|
-
class="owl-dt-control-content owl-dt-control-button-content"
|
|
119
|
-
tabindex="-1"
|
|
120
|
-
>
|
|
121
|
-
{{ setLabel }}
|
|
122
|
-
</span>
|
|
123
|
-
</button>
|
|
124
|
-
</div>
|
|
125
|
-
}
|
|
126
|
-
</div>
|
|
File without changes
|