Skip to content

Commit 539a5a7

Browse files
author
Sharma
committed
Added formatting for DD/MM/YYYY
1 parent d78a9f4 commit 539a5a7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/angular-sdk-components/src/lib/_components/field/text/text.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class TextComponent implements OnInit, OnDestroy {
138138
// day: 'numeric'
139139
// }).format(new Date(sVal + "T00:00"));
140140

141-
return this.utils.generateDate(sVal, 'Date-DayMonthYear-Custom');
141+
return this.utils.generateDate(sVal, 'Date-Long-Custom-DD/MM/YYYY');
142142
}
143143

144144
generateDateTime(sVal): string {

packages/angular-sdk-components/src/lib/_helpers/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ export class Utils {
213213
// 05/22/2021
214214
sReturnDate = dayjs(dateVal).format('MM/DD/YYYY');
215215
break;
216+
case 'Date-Long-Custom-DD/MM/YYYY':
217+
// 22/05/2021
218+
sReturnDate = dayjs(dateVal).format('DD/MM/YYYY');
219+
break;
216220
case 'Date':
217221
case 'Date-Medium':
218222
// Jan 1, 2001

0 commit comments

Comments
 (0)