wwf
2025-05-20 938c3e5a587ce950a94964ea509b9e7f8834dfae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import type { Dayjs } from 'dayjs'
 
export enum ViewType {
  date = 'date',
  yearMonth = 'yearMonth',
  time = 'time',
}
 
export enum Period {
  AM = 'AM',
  PM = 'PM',
}
 
export type TriggerProps = {
  value: Dayjs | undefined
  selectedDate: Dayjs | undefined
  isOpen: boolean
  handleClear: (e: React.MouseEvent) => void
  handleClickTrigger: (e: React.MouseEvent) => void
}
 
export type DatePickerProps = {
  value: Dayjs | undefined
  timezone?: string
  placeholder?: string
  needTimePicker?: boolean
  onChange: (date: Dayjs | undefined) => void
  onClear: () => void
  triggerWrapClassName?: string
  renderTrigger?: (props: TriggerProps) => React.ReactNode
  popupZIndexClassname?: string
}
 
export type DatePickerHeaderProps = {
  handleOpenYearMonthPicker: () => void
  currentDate: Dayjs
  onClickNextMonth: () => void
  onClickPrevMonth: () => void
}
 
export type DatePickerFooterProps = {
  needTimePicker: boolean
  displayTime: string
  view: ViewType
  handleClickTimePicker: () => void
  handleSelectCurrentDate: () => void
  handleConfirmDate: () => void
}
 
export type TimePickerProps = {
  value: Dayjs | undefined
  timezone?: string
  placeholder?: string
  onChange: (date: Dayjs | undefined) => void
  onClear: () => void
  renderTrigger?: () => React.ReactNode
}
 
export type TimePickerFooterProps = {
  handleSelectCurrentTime: () => void
  handleConfirm: () => void
}
 
export type Day = {
  date: Dayjs
  isCurrentMonth: boolean
}
 
export type CalendarProps = {
  days: Day[]
  selectedDate: Dayjs | undefined
  onDateClick: (date: Dayjs) => void
  wrapperClassName?: string
}
 
export type CalendarItemProps = {
  day: Day
  selectedDate: Dayjs | undefined
  onClick: (date: Dayjs) => void
}
 
export type TimeOptionsProps = {
  selectedTime: Dayjs | undefined
  handleSelectHour: (hour: string) => void
  handleSelectMinute: (minute: string) => void
  handleSelectPeriod: (period: Period) => void
}
 
export type YearAndMonthPickerHeaderProps = {
  selectedYear: number
  selectedMonth: number
  onClick: () => void
}
 
export type YearAndMonthPickerOptionsProps = {
  selectedYear: number
  selectedMonth: number
  handleYearSelect: (year: number) => void
  handleMonthSelect: (month: number) => void
}
 
export type YearAndMonthPickerFooterProps = {
  handleYearMonthCancel: () => void
  handleYearMonthConfirm: () => void
}