Skip to content

Commit

Permalink
ACS-6189 Fixed date format
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderSklorz committed Oct 25, 2023
1 parent 45fa6c1 commit f7ef47a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
*/

import { NgModule } from '@angular/core';
import { CoreModule } from '@alfresco/adf-core';
import { ADF_DATE_FORMATS, AdfDateFnsAdapter, CoreModule } from '@alfresco/adf-core';
import { DateRangeFilterComponent } from './date-range-filter/date-range-filter.component';
import { MaterialModule } from '../material.module';
import { CommonModule } from '@angular/common';
import { DateRangeFilterService } from './date-range-filter/date-range-filter.service';
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';

@NgModule({
declarations: [ DateRangeFilterComponent ],
Expand All @@ -33,7 +34,9 @@ import { DateRangeFilterService } from './date-range-filter/date-range-filter.se
DateRangeFilterComponent
],
providers: [
DateRangeFilterService
DateRangeFilterService,
{ provide: DateAdapter, useClass: AdfDateFnsAdapter },
{ provide: MAT_DATE_FORMATS, useValue: ADF_DATE_FORMATS }
]
})
export class ProcessCommonModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@
import { Component, OnInit, ViewEncapsulation, OnDestroy, Input } from '@angular/core';
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
import { Subject } from 'rxjs';
import { WidgetComponent, FormService, AdfDateFnsAdapter, DateFnsUtils } from '@alfresco/adf-core';
import { WidgetComponent, FormService, AdfDateFnsAdapter, DateFnsUtils, ADF_DATE_FORMATS } from '@alfresco/adf-core';
import { MatDatepickerInputEvent } from '@angular/material/datepicker';
import { CLOUD_FORM_DATE_FORMATS } from '../../../date-formats';
import { addDays, subDays } from 'date-fns';

@Component({
selector: 'date-widget',
providers: [
{ provide: MAT_DATE_FORMATS, useValue: CLOUD_FORM_DATE_FORMATS },
{ provide: MAT_DATE_FORMATS, useValue: ADF_DATE_FORMATS },
{ provide: DateAdapter, useClass: AdfDateFnsAdapter }
],
templateUrl: './date-cloud.widget.html',
Expand Down
38 changes: 0 additions & 38 deletions lib/process-services-cloud/src/lib/form/date-formats.ts

This file was deleted.

1 change: 0 additions & 1 deletion lib/process-services-cloud/src/lib/form/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ export * from './services/content-cloud-node-selector.service';
export * from './services/process-cloud-content.service';

export * from './form-cloud.module';
export * from './date-formats';

0 comments on commit f7ef47a

Please sign in to comment.