mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
committed by
Eugenio Romano
parent
53d96679ea
commit
e39a2b149b
@@ -36,7 +36,7 @@ describe('SearchDateRangeComponent', () => {
|
||||
|
||||
const buildAdapter = (): MomentDateAdapter => {
|
||||
const dateAdapter = new MomentDateAdapter();
|
||||
dateAdapter.overrideDisplyaFormat = null;
|
||||
dateAdapter.overrideDisplayFormat = null;
|
||||
return dateAdapter;
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ describe('SearchDateRangeComponent', () => {
|
||||
it('should setup the format of the date from configuration', () => {
|
||||
component.settings = { field: 'cm:created', dateFormat: dateFormatFixture };
|
||||
component.ngOnInit();
|
||||
expect(theDateAdapter.overrideDisplyaFormat).toBe(dateFormatFixture);
|
||||
expect(theDateAdapter.overrideDisplayFormat).toBe(dateFormatFixture);
|
||||
});
|
||||
|
||||
it('should setup form control with formatted valid date on change', () => {
|
||||
|
@@ -80,7 +80,7 @@ export class SearchDateRangeComponent implements SearchWidget, OnInit {
|
||||
this.datePickerDateFormat = this.settings.dateFormat || DEFAULT_FORMAT_DATE;
|
||||
}
|
||||
const theCustomDateAdapter = <MomentDateAdapter> <any> this.dateAdapter;
|
||||
theCustomDateAdapter.overrideDisplyaFormat = this.datePickerDateFormat;
|
||||
theCustomDateAdapter.overrideDisplayFormat = this.datePickerDateFormat;
|
||||
|
||||
this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => {
|
||||
this.setLocale(locale);
|
||||
|
Reference in New Issue
Block a user