DateField extends AbstractField
in package

Tags
since
1.11.0

Table of Contents

TYPE  = 'date'
$description  : string
$isDisabled  : bool
$isInline  : bool
$isReadonly  : bool
$label  : string
$atts  : array<string|int, mixed>
$class  : string
$default  : string
$inputId  : string
$inputName  : string
$name  : string
$sizeClass  : string
$value  : mixed
__construct()  : mixed
getType()  : string
getValue()  : mixed
hasDescription()  : string
hasLabel()  : string
isSingle()  : bool
renderBody()  : string
renderDescription()  : string
renderInput()  : string
renderLabel()  : string
setDefault()  : mixed
setName()  : mixed
setSize()  : mixed
setValue()  : mixed
controlAtts()  : array<string|int, mixed>
getWrapperTag()  : string
inputAtts()  : array<string|int, mixed>
mapFields()  : array<string|int, mixed>
setupArgs()  : mixed
validateValue()  : array<string|int, mixed>

Constants

TYPE

public mixed TYPE = 'date'

Properties

$description

public string $description = ''
Tags
since
1.0

$isDisabled

public bool $isDisabled = false
Tags
since
1.7.0

$isInline

public bool $isInline = false
Tags
since
1.3

$isReadonly

public bool $isReadonly = false
Tags
since
1.7.0

$label

public string $label = ''
Tags
since
1.0

$atts

protected array<string|int, mixed> $atts = []
Tags
since
1.0

$class

protected string $class = ''
Tags
since
1.0

$default

protected string $default = ''

$inputId

protected string $inputId = ''
Tags
since
1.0

$inputName

protected string $inputName = ''
Tags
since
1.0

$name

protected string $name = ''
Tags
since
1.0

$sizeClass

protected string $sizeClass = ''
Tags
since
1.0

$value

protected mixed $value = ''
Tags
since
1.0

Methods

__construct()

public __construct(string $inputName, array<string|int, mixed> $args[, mixed $value = null ]) : mixed
Parameters
$inputName : string

Prefixed name.

$args : array<string|int, mixed>
$value : mixed = null

Optional. Null by default.

Tags
since
1.0
Return values
mixed

getType()

public getType() : string
Tags
since
1.2
Return values
string

getValue()

public getValue([string $context = 'internal' ]) : mixed
Parameters
$context : string = 'internal'

Optional. 'internal' by default. Variants: 'internal' - for internal use (in the functions of the plugin); 'save' - prepare the value for the database.

Tags
since
1.0
Return values
mixed

hasDescription()

public hasDescription() : string
Tags
since
1.1.0
Return values
string

hasLabel()

public hasLabel() : string
Tags
since
1.0
Return values
string

isSingle()

public isSingle() : bool
Tags
since
1.0
Return values
bool

Uses single or multiple postmetas.

renderBody()

public renderBody() : string
Tags
since
1.0
Return values
string

renderDescription()

public renderDescription() : string
Tags
since
1.1.0
Return values
string

renderInput()

public renderInput() : string
Return values
string

renderLabel()

public renderLabel() : string
Tags
since
1.0
Return values
string

setDefault()

public setDefault(mixed $default) : mixed
Parameters
$default : mixed
Tags
since
1.0
Return values
mixed

setName()

public setName(string $inputName) : mixed
Parameters
$inputName : string

Prefixed name.

Tags
since
1.0
Return values
mixed

setSize()

public setSize(string $size) : mixed
Parameters
$size : string

small|regular|mild|large|half|wide

Tags
since
1.0
Return values
mixed

setValue()

public setValue(mixed $value[, mixed $validate = false ]) : mixed
Parameters
$value : mixed
$validate : mixed = false

Optional. False by default.

Tags
since
1.0
Return values
mixed

controlAtts()

protected controlAtts() : array<string|int, mixed>
Return values
array<string|int, mixed>

getWrapperTag()

protected getWrapperTag([string $blockTag = 'div' ][, string $inlineTag = 'span' ]) : string
Parameters
$blockTag : string = 'div'

Optional. 'div' by default.

$inlineTag : string = 'span'

Optional. 'span' by default.

Tags
since
1.3
Return values
string

inputAtts()

protected inputAtts() : array<string|int, mixed>
Return values
array<string|int, mixed>

mapFields()

protected mapFields() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

setupArgs()

protected setupArgs(array<string|int, mixed> $args) : mixed
Parameters
$args : array<string|int, mixed>
Tags
since
1.0
Return values
mixed

validateValue()

protected validateValue(mixed $value) : array<string|int, mixed>
Parameters
$value : mixed
Return values
array<string|int, mixed>

Search results