@libs-ui/components-datetime-picker 0.2.314-0 → 0.2.316-0

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.
@@ -149,7 +149,7 @@ const getMonthsListConfig = (translate) => {
149
149
  };
150
150
  const getMonthsDetailById = () => {
151
151
  return {
152
- serviceOther: returnDetailObject(UtilsHttpParamsRequestInstance(), getMonthsDefault()),
152
+ objectInstance: returnDetailObject(UtilsHttpParamsRequestInstance(), getMonthsDefault()),
153
153
  functionName: 'detailByData',
154
154
  argumentsValue: [],
155
155
  guideAutoUpdateArgumentsValue: {
@@ -182,7 +182,7 @@ const getYearsListConfig = (listOfYears = []) => {
182
182
  };
183
183
  const getYearsDetailById = (listOfYears = []) => {
184
184
  return {
185
- serviceOther: returnDetailObject(UtilsHttpParamsRequestInstance(), listOfYears),
185
+ objectInstance: returnDetailObject(UtilsHttpParamsRequestInstance(), listOfYears),
186
186
  functionName: 'detailByData',
187
187
  argumentsValue: [],
188
188
  guideAutoUpdateArgumentsValue: {
@@ -506,7 +506,7 @@ class LibsUiComponentsDatetimePickerCustomRangesCalendarComponent {
506
506
  const maxDate = getDayjs({ date: this.maxDate() });
507
507
  if (type === 'left') {
508
508
  this.disableMonth().left.set([]);
509
- if (minDate?.year() === this.listKeyFromSelected().year) {
509
+ if (minDate && minDate?.year() === this.listKeyFromSelected().year) {
510
510
  for (let i = 1; i < minDate?.month() + 1; i++) {
511
511
  this.disableMonth().left.update((current) => {
512
512
  current.push(i);
@@ -514,7 +514,7 @@ class LibsUiComponentsDatetimePickerCustomRangesCalendarComponent {
514
514
  });
515
515
  }
516
516
  }
517
- if (maxDate?.year() === this.listKeyFromSelected().year) {
517
+ if (maxDate && maxDate?.year() === this.listKeyFromSelected().year) {
518
518
  for (let i = maxDate?.month() + 2; i < 13; i++) {
519
519
  this.disableMonth().left.update((current) => {
520
520
  current.push(i);
@@ -525,7 +525,7 @@ class LibsUiComponentsDatetimePickerCustomRangesCalendarComponent {
525
525
  return;
526
526
  }
527
527
  this.disableMonth().right.set([]);
528
- if (minDate?.year() === this.listKeyToSelected().year) {
528
+ if (minDate && minDate?.year() === this.listKeyToSelected().year) {
529
529
  for (let i = 1; i < minDate?.month() + 1; i++) {
530
530
  this.disableMonth().right.update((current) => {
531
531
  current.push(i);
@@ -533,7 +533,7 @@ class LibsUiComponentsDatetimePickerCustomRangesCalendarComponent {
533
533
  });
534
534
  }
535
535
  }
536
- if (maxDate?.year() === this.listKeyToSelected().year) {
536
+ if (maxDate && maxDate?.year() === this.listKeyToSelected().year) {
537
537
  for (let i = maxDate?.month() + 2; i < 13; i++) {
538
538
  this.disableMonth().right.update((current) => {
539
539
  current.push(i);
@@ -1839,10 +1839,11 @@ class LibsUiComponentsDatetimePickerComponent {
1839
1839
  outFunctionsControl = output();
1840
1840
  constructor() {
1841
1841
  effect(() => {
1842
- if (this.singleDateSelected()?.date) {
1842
+ const date = this.singleDateSelected()?.date;
1843
+ if (date) {
1843
1844
  untracked(() => {
1844
1845
  const formatDate = this.hasTimePicker() ? 'DD/MM/YYYY HH:mm' : 'DD/MM/YYYY';
1845
- const startTime = getDayjs({ date: this.singleDateSelected()?.date })?.format(formatDate);
1846
+ const startTime = getDayjs({ date }).format(formatDate);
1846
1847
  this.chosenDateFromRanges.set({ selectedLabel: startTime });
1847
1848
  });
1848
1849
  }