ngx-ode-ui 4.8.0-develop-b2school.15 → 4.8.0-develop-pedago.8
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/esm2020/lib/components/datepicker/datepicker.component.mjs +5 -21
- package/fesm2015/ngx-ode-ui.mjs +3 -19
- package/fesm2015/ngx-ode-ui.mjs.map +1 -1
- package/fesm2020/ngx-ode-ui.mjs +3 -19
- package/fesm2020/ngx-ode-ui.mjs.map +1 -1
- package/lib/components/datepicker/datepicker.component.d.ts +1 -3
- package/package.json +1 -1
package/fesm2020/ngx-ode-ui.mjs
CHANGED
|
@@ -202,8 +202,6 @@ class DatepickerComponent extends OdeComponent {
|
|
|
202
202
|
this.changeDate = new EventEmitter();
|
|
203
203
|
this.onChangeCallback = NOOP;
|
|
204
204
|
this.onTouchedCallback = NOOP;
|
|
205
|
-
this.onInputChangeObserver = null;
|
|
206
|
-
this.debounceTimer = null;
|
|
207
205
|
}
|
|
208
206
|
get value() {
|
|
209
207
|
return this.innerValue;
|
|
@@ -252,37 +250,23 @@ class DatepickerComponent extends OdeComponent {
|
|
|
252
250
|
altInput: !this.disabled,
|
|
253
251
|
altFormat: 'd/m/Y',
|
|
254
252
|
dateFormat: 'Y-m-d',
|
|
255
|
-
allowInput:
|
|
253
|
+
allowInput: false,
|
|
256
254
|
enableTime: this.enableTime,
|
|
257
255
|
minDate: this.minDate,
|
|
258
256
|
maxDate: this.maxDate,
|
|
259
257
|
clickOpens: false,
|
|
260
258
|
wrap: true,
|
|
261
|
-
locale: datePickerLocale
|
|
262
|
-
onChange: (selectedDates, dateStr) => {
|
|
263
|
-
this.value = dateStr;
|
|
264
|
-
},
|
|
265
|
-
onClose: () => {
|
|
266
|
-
this.onTouchedCallback();
|
|
267
|
-
}
|
|
259
|
+
locale: datePickerLocale
|
|
268
260
|
};
|
|
269
261
|
this.datePickerInst = new Flatpickr(this.datePickerElement.nativeElement, options);
|
|
270
262
|
if (!this.disabled) {
|
|
271
|
-
// Add click handler for the alt input
|
|
272
263
|
this.datePickerInst.altInput.addEventListener('click', e => {
|
|
273
264
|
if (!this.readonly) {
|
|
274
265
|
this.datePickerInst.toggle();
|
|
275
266
|
}
|
|
276
267
|
});
|
|
277
|
-
// Add debounced input handler for manual entry
|
|
278
|
-
this.datePickerInst.altInput.addEventListener('blur', e => {
|
|
279
|
-
const inputDate = this.datePickerInst.parseDate(this.datePickerInst.altInput.value, options.altFormat);
|
|
280
|
-
if (inputDate) {
|
|
281
|
-
this.datePickerInst.setDate(inputDate, true);
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
268
|
}
|
|
285
|
-
// Force updating the date input readonly attribute
|
|
269
|
+
// Force updating the date input readonly attribute :
|
|
286
270
|
this.readonly = this._readonly;
|
|
287
271
|
}
|
|
288
272
|
ngOnDestroy() {
|