Skip to main content

resolveSlot

A slot the control offers for an untrusted value: rounded down to the step and moved inside the bounds, or undefined when it is not a slot at all.

This is a function exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import { resolveSlot } from "@mapcairn/core";

function resolveSlot(control: DateTimeControlDefinition, value: string, now: number): string | undefined;

Parameters​

  • control (DateTimeControlDefinition)
  • value (string)
  • now (number)

Returns​

string | undefined

See also​

Source: packages/core/src/layers/dateTime.ts:120