Skip to content

Commit

Permalink
fix(footer): tweak date format in custom footer for redability (#518)
Browse files Browse the repository at this point in the history
* fix(footer): tweak date format in custom footer for redability
  • Loading branch information
ghiscoding authored Jul 9, 2020
1 parent f6cd58c commit b2a0823
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/examples/grid-localization.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class GridLocalizationComponent implements OnInit {
ofKey: 'OF',
lastUpdateKey: 'LAST_UPDATE',
},
dateFormat: 'yyyy-MM-dd hh:mm aaaaa\'m\'',
dateFormat: 'yyyy-MM-dd, hh:mm aaaaa\'m\'',
hideTotalItemCount: false,
hideLastUpdateTimestamp: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ describe('Angular-Slickgrid Custom Component instantiated via Constructor', () =
expect(component.columnDefinitions).toEqual(mockColDefs);
expect(component.showCustomFooter).toBeTrue();
expect(component.customFooterOptions).toEqual({
dateFormat: 'yyyy-MM-dd hh:mm aaaaa\'m\'',
dateFormat: 'yyyy-MM-dd, hh:mm aaaaa\'m\'',
hideLastUpdateTimestamp: true,
hideTotalItemCount: false,
footerHeight: 20,
Expand Down Expand Up @@ -1358,7 +1358,7 @@ describe('Angular-Slickgrid Custom Component instantiated via Constructor', () =
expect(component.columnDefinitions).toEqual(mockColDefs);
expect(component.showCustomFooter).toBeTrue();
expect(component.customFooterOptions).toEqual({
dateFormat: 'yyyy-MM-dd hh:mm aaaaa\'m\'',
dateFormat: 'yyyy-MM-dd, hh:mm aaaaa\'m\'',
hideLastUpdateTimestamp: true,
hideTotalItemCount: false,
footerHeight: 20,
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/angular-slickgrid/global-grid-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const GlobalGridOptions: Partial<GridOption> = {
width: 200,
},
customFooterOptions: {
dateFormat: 'yyyy-MM-dd hh:mm aaaaa\'m\'',
dateFormat: 'yyyy-MM-dd, hh:mm aaaaa\'m\'',
hideTotalItemCount: false,
hideLastUpdateTimestamp: true,
footerHeight: 20,
Expand Down
4 changes: 2 additions & 2 deletions test/cypress/integration/example12.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('Example 12: Localization (i18n)', () => {
.should($span => {
const text = removeExtraSpaces($span.text()); // remove all white spaces
const now = new Date();
const dateFormatted = moment(now).format('YYYY-MM-DD hh:mm a');
const dateFormatted = moment(now).format('YYYY-MM-DD, hh:mm a');
expect(text).to.eq(`Last Update ${dateFormatted} | 1500 of 1500 items`);
});
});
Expand Down Expand Up @@ -104,7 +104,7 @@ describe('Example 12: Localization (i18n)', () => {
.should($span => {
const now = new Date();
const text = removeExtraSpaces($span.text()); // remove all white spaces
const dateFormatted = moment(now).format('YYYY-MM-DD hh:mm a');
const dateFormatted = moment(now).format('YYYY-MM-DD, hh:mm a');
expect(text).to.eq(`Dernière mise à jour ${dateFormatted} | 1500 de 1500 éléments`);
});
});
Expand Down

0 comments on commit b2a0823

Please sign in to comment.