Fix an issue with calendar UTC time

This commit is contained in:
Chris Veleris 2025-07-05 21:40:46 +03:00
parent d1c04cd2ca
commit e54b3708e8

View file

@ -33,7 +33,10 @@ const DatePicker: React.FC<DatePickerProps> = ({
const days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
const formatDate = (date: Date) => {
return date.toISOString().split('T')[0];
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
};
const parseDate = (dateString: string) => {