Skip to content

Commit d57cd42

Browse files
authored
chore: more ts (#716)
1 parent c195946 commit d57cd42

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/examples/debug.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ export default () => {
163163
// dayjs('2000-01-09'),
164164
]}
165165
// disabledDate={(date) => date.date() >= 5}
166+
getPopupContainer={(node) => {
167+
console.log('Popup!', node);
168+
return node.parentElement!;
169+
}}
166170
presets={[
167171
{
168172
label: 'Good',
@@ -192,6 +196,7 @@ export default () => {
192196
<RangePicker
193197
{...sharedLocale}
194198
value={rangeValue}
199+
separator="~~~~~"
195200
showTime={{
196201
defaultValue: [dayjs('2000-01-01 01:02:03'), dayjs('2000-01-01 05:06:07')],
197202
}}

src/PickerInput/RangePicker.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ function separateConfig<T>(config: T | [T, T] | null | undefined, defaultConfig:
4646
return [singleConfig, singleConfig];
4747
}
4848

49-
export type RangeValueType<DateType> = [start?: DateType, end?: DateType];
49+
export type RangeValueType<DateType> = [start?: DateType | null, end?: DateType | null];
5050

5151
export interface BaseRangePickerProps<DateType extends object>
5252
extends Omit<SharedPickerProps<DateType>, 'showTime' | 'id'> {
5353
// Structure
5454
id?: SelectorIdType;
5555

56+
separator?: React.ReactNode;
57+
5658
// Value
5759
value?: RangeValueType<DateType>;
5860
defaultValue?: RangeValueType<DateType>;

0 commit comments

Comments
 (0)