Skip to content

Commit

Permalink
chore: update date formats
Browse files Browse the repository at this point in the history
  • Loading branch information
tewarig committed Jan 15, 2025
1 parent d58d7f8 commit 87bd14e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions packages/blade/src/components/DatePicker/DatePicker.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const DatePicker = <Type extends DateSelectionType = 'single'>({
picker,
onPickerChange,
zIndex = componentZIndices.popover,
format,
format = 'DD/MM/YYYY',
inputPlaceHolder,
...props
}: DatePickerProps<Type> & StyledPropsBlade & DataAnalyticsAttribute): React.ReactElement => {
Expand All @@ -89,9 +89,6 @@ const DatePicker = <Type extends DateSelectionType = 'single'>({
if (format) {
return format;
}
if (picker === 'day') {
return 'DD';
}
if (picker === 'month') {
return 'MMMM';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/blade/src/components/DatePicker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ type DatePickerProps<Type extends DateSelectionType> = Omit<
* Sets the date format to be displayed in the input field.
* @default 'DD/MM/YYYY' if pickerType is 'date' then 'DD', if pickerType is 'month' then 'MMMM', 'YYYY' if pickerType is 'year'
*/
format?: string;
format?: 'DD/MM/YYYY' | 'MMM' | 'MMMM' | 'YYYY';
/**
* Placeholder text for the datepicker input , when no date is selected.
* @default 'DD/MM/YYYY' if pickerType is 'date' then 'DD', if pickerType is 'month' then 'MMMM', 'YYYY' if pickerType is 'year'
Expand Down

0 comments on commit 87bd14e

Please sign in to comment.