Skip to main content

mb-duration

Properties

PropertyAttributeTypeDefaultDescription
datastring | undefinedData of the element. Setting this will emit an input event automatically.
datatypedatatypestring | undefinedAn internal representation of type to handle serializing
daydaybooleanfalse
disableddisabledboolean
hourhourbooleanfalse
isMbElementbooleantrue
labellabelstring | undefinedOptional label for the element
minuteminutebooleanfalse
monthmonthbooleanfalse
pathpathstringPath of the data element. Use the VSCode extension to get the appropriate paths
requiredrequiredbooleanfalse
secondsecondbooleanfalse
weekweekbooleanfalse
yearyearbooleanfalse

Methods

MethodTypeDescription
formatDuration(value: string): string
getInputs(): TemplateResult[]
getPart(periodPart: string, part: string): string | undefined
handleInput(value: string, e: CustomEvent<any>): void
handlePathChange(oldPath: string, newPath: string): void
parsePeriod(period: string | undefined): void
reportValidity(): booleanFunction to validate the element during form submit
serializePeriod(): string | undefined

Events

EventDescription
mb-connectDispatched when the component connects
mb-dependencyDispatched if dependencies are needed from an external or parent source
mb-disconnectDispatched when the component disconnects
mb-inputDispatched when the input changes