Skip to content

Commit 1f1abaa

Browse files
authored
fix(datepicker): Add local timezone offset to display date (#2778)
1 parent 1128c54 commit 1f1abaa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/date-picker/DatePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ class DatePicker extends React.Component<DatePickerProps> {
490490

491491
formatDisplayDateType = (date?: Date | null): string => {
492492
// Input type "date" only accepts the format YYYY-MM-DD
493-
return date ? date.toISOString().slice(0, 10) : '';
493+
return date ? getFormattedDate(date, DateFormat.UTC_ISO_STRING_DATE_FORMAT).slice(0, 10) : '';
494494
};
495495

496496
parseDisplayDateType = (dateString?: string | null): Date | null => {

0 commit comments

Comments
 (0)