Fix an issue with calendar UTC time
This commit is contained in:
parent
d1c04cd2ca
commit
e54b3708e8
1 changed files with 4 additions and 1 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue