MCPcopy Create free account
hub / github.com/adobe/react-spectrum / toCalendarDate

Function toCalendarDate

packages/@internationalized/date/src/conversion.ts:269–277  ·  view source on GitHub ↗
(dateTime: AnyCalendarDate)

Source from the content-addressed store, hash-verified

267 * `CalendarDate`.
268 */
269export function toCalendarDate(dateTime: AnyCalendarDate): CalendarDate {
270 return new CalendarDate(
271 dateTime.calendar,
272 dateTime.era,
273 dateTime.year,
274 dateTime.month,
275 dateTime.day
276 );
277}
278
279export function toDateFields(date: AnyCalendarDate): DateFields {
280 return {

Callers 12

useCalendarYearPickerFunction · 0.90
useCalendarStateFunction · 0.90
useRangeCalendarStateFunction · 0.90
makeRangeFunction · 0.90
constrainStartFunction · 0.90
constrainValueFunction · 0.90
commitValueFunction · 0.90
createPlaceholderDateFunction · 0.90
commitValueFunction · 0.90
todayFunction · 0.90
useHiddenDateInputFunction · 0.90
conversion.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected