Skip to content

Commit c89577a

Browse files
fix: rollback changes and fix
1 parent 00e6069 commit c89577a

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

packages/vkui/src/components/CalendarTime/CalendarTime.module.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@
2020
.button {
2121
margin-inline-start: auto;
2222
}
23-
24-
.optionLabel {
25-
white-space: nowrap;
26-
}

packages/vkui/src/components/CalendarTime/CalendarTimePicker.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { type ChangeEvent, useState } from 'react';
44
import * as React from 'react';
55
import { AdaptivityProvider } from '../AdaptivityProvider/AdaptivityProvider';
66
import { CustomSelect, type SelectProps } from '../CustomSelect/CustomSelect';
7-
import { CustomSelectOption } from '../CustomSelectOption/CustomSelectOption';
87
import styles from './CalendarTime.module.css';
98

109
const selectFilterFn = () => true;
@@ -79,11 +78,6 @@ export const CalendarTimePicker = ({
7978
filterFn={selectFilterFn}
8079
onInputChange={onPickerValueChange}
8180
onInputKeyDown={onInputKeyDown}
82-
renderOption={({ children, ...props }) => (
83-
<CustomSelectOption {...props}>
84-
<span className={styles.optionLabel}>{children}</span>
85-
</CustomSelectOption>
86-
)}
8781
slotProps={{
8882
input: {
8983
'aria-label': inputLabel,

packages/vkui/src/components/DateInput/DateInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export const DateInput = ({
345345
const now = new Date();
346346
const referenceDate = value ?? (enableTime ? startOfMinute(now) : startOfDay(now));
347347
const parsed = parse(formattedValue, mask, referenceDate);
348-
const toUpdate = timezone ? createDateInTimeZone(parsed, timezone) : parsed;
348+
const toUpdate = createDateInTimeZone(parsed, timezone);
349349
updateValue(toUpdate);
350350
}
351351
},

packages/vkui/src/lib/date.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export type CreateDateInTimeZoneOverrides = {
152152

153153
export function createDateInTimeZone(
154154
baseDate: Date,
155-
timezone: string | undefined,
155+
timezone?: string,
156156
overrides?: CreateDateInTimeZoneOverrides,
157157
): Date {
158158
const year = overrides?.year ?? baseDate.getFullYear();

0 commit comments

Comments
 (0)