DateRangeField

Source
import { DateRangeField } from "@prestojs/viewmodel";
Hierarchy

Examples

Default widget in a Form

Default formatter for DateRangeField

API

Constructor

new DateRangeField(?props)
Source

Arguments:

ArgumentTypeDescription
props
An object with the properties below
props.blankboolean
props.blankAsNullboolean
props.boundsFieldProps
props.defaultValuenull|ValueT|
props.formatterPropsRecord
props.helpTextstring
props.labelstring
props.readOnlyboolean
props.widgetPropsRecord
props.writeOnlyboolean

Methods

clone()
Source
Returns:Field
contributeToClass(viewModel)
Source

Arguments:

ArgumentTypeDescription
*viewModelViewModelConstructor
Returns:void
format(value)
Source

Arguments:

ArgumentTypeDescription
*value
Returns:any
getFormatterProps()
Source
Returns:{[fieldName: string]: any }
getWidgetProps()
Source
Returns:{[fieldName: string]: any }
isEqual(?value1,?value2)
Source

Arguments:

ArgumentTypeDescription
value1
value2
Returns:boolean
normalize(value)
Source

Arguments:

ArgumentTypeDescription
*value
Returns:null|
An object with these properties:
PropertyTypeDescription
*lowerT
*upperT
parse(value)
Source

Arguments:

ArgumentTypeDescription
*valuenull|
Returns:null|
An object with these properties:
PropertyTypeDescription
*lowerT
*upperT
toJS(value)
Source

Arguments:

ArgumentTypeDescription
*value
Returns:null|string|number|Record
toString()
Source
Returns:string

Properties

blank

Source
boolean

blankAsNull

Source
boolean

boundRecord

Source
undefined|ViewModelInterface

boundsField

Source
Field

choices

Source

defaultValue

Source
undefined|null|ValueT|Promise

formatterProps

Source
Record

helpText

Source
string

isBound

Source
boolean

label

Source
string

name

Source
string

readOnly

Source
boolean

value

Source
undefined|ValueT

widgetProps

Source
Record

writeOnly

Source
boolean

Static Properties

fieldClassName

Source
string