@instructure/ui-calendar 8.52.1-snapshot-7 → 8.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -89
- package/es/Calendar/index.js +22 -15
- package/es/Calendar/props.js +3 -2
- package/lib/Calendar/index.js +22 -15
- package/lib/Calendar/props.js +3 -2
- package/package.json +19 -19
- package/src/Calendar/README.md +26 -33
- package/src/Calendar/index.tsx +31 -24
- package/src/Calendar/props.ts +17 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Calendar/index.d.ts +7 -5
- package/types/Calendar/index.d.ts.map +1 -1
- package/types/Calendar/props.d.ts +7 -3
- package/types/Calendar/props.d.ts.map +1 -1
package/src/Calendar/props.ts
CHANGED
|
@@ -85,12 +85,18 @@ type CalendarOwnProps = {
|
|
|
85
85
|
* Callback fired when the next month button is clicked in the navigation
|
|
86
86
|
* header, requesting to render the next month.
|
|
87
87
|
*/
|
|
88
|
-
onRequestRenderNextMonth?: (
|
|
88
|
+
onRequestRenderNextMonth?: (
|
|
89
|
+
e: React.MouseEvent,
|
|
90
|
+
requestedMonth: string
|
|
91
|
+
) => void
|
|
89
92
|
/**
|
|
90
93
|
* Callback fired when the previous month button is clicked in the navigation
|
|
91
94
|
* header, requesting to render the previous month.
|
|
92
95
|
*/
|
|
93
|
-
onRequestRenderPrevMonth?: (
|
|
96
|
+
onRequestRenderPrevMonth?: (
|
|
97
|
+
e: React.MouseEvent,
|
|
98
|
+
requestedMonth: string
|
|
99
|
+
) => void
|
|
94
100
|
/**
|
|
95
101
|
* Content to render in the navigation header. The recommendation is to include
|
|
96
102
|
* the name of the current rendered month along with the year.
|
|
@@ -142,6 +148,10 @@ type CalendarOwnProps = {
|
|
|
142
148
|
* property or a context property.
|
|
143
149
|
*/
|
|
144
150
|
timezone?: string
|
|
151
|
+
/**
|
|
152
|
+
* Visible month for the rendered calendar. Formatted as an ISO date string.
|
|
153
|
+
*/
|
|
154
|
+
visibleMonth?: string
|
|
145
155
|
}
|
|
146
156
|
|
|
147
157
|
type PropKeys = keyof CalendarOwnProps
|
|
@@ -173,7 +183,8 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
173
183
|
),
|
|
174
184
|
role: PropTypes.oneOf(['table', 'listbox']),
|
|
175
185
|
selectedDate: PropTypes.string,
|
|
176
|
-
timezone: PropTypes.string
|
|
186
|
+
timezone: PropTypes.string,
|
|
187
|
+
visibleMonth: PropTypes.string
|
|
177
188
|
}
|
|
178
189
|
|
|
179
190
|
const allowedProps: AllowedPropKeys = [
|
|
@@ -191,11 +202,12 @@ const allowedProps: AllowedPropKeys = [
|
|
|
191
202
|
'renderWeekdayLabels',
|
|
192
203
|
'role',
|
|
193
204
|
'selectedDate',
|
|
194
|
-
'timezone'
|
|
205
|
+
'timezone',
|
|
206
|
+
'visibleMonth'
|
|
195
207
|
]
|
|
196
208
|
|
|
197
209
|
type CalendarState = {
|
|
198
|
-
|
|
210
|
+
visibleMonth: Moment
|
|
199
211
|
today: Moment
|
|
200
212
|
}
|
|
201
213
|
|