MCPcopy Index your code
hub / github.com/adobe/react-spectrum / convertValue

Function convertValue

packages/react-stately/src/datepicker/utils.ts:239–252  ·  view source on GitHub ↗
(
  value: DateValue | null | undefined,
  calendar: Calendar
)

Source from the content-addressed store, hash-verified

237}
238
239export function convertValue(
240 value: DateValue | null | undefined,
241 calendar: Calendar
242): DateValue | null | undefined {
243 if (value === null) {
244 return null;
245 }
246
247 if (!value) {
248 return undefined;
249 }
250
251 return toCalendar(value, calendar);
252}
253
254export function createPlaceholderDate(
255 placeholderValue: DateValue | null | undefined,

Callers 2

useDateFieldStateFunction · 0.90
createPlaceholderDateFunction · 0.70

Calls 1

toCalendarFunction · 0.90

Tested by

no test coverage detected