UIDatetimeFieldEditor

An editor component that lets the user edit text fields on a node.

See: UIFieldEditor for text editing Since: 6.0.0 (3.8.0)

Name

Type

Default

Description

field

string | Array.<string>

Required - Name of the node field to edit

node

Node

Required - The node

label

string

Required - Label of the date editor

type

string

"datetime"

one of 'datetime', 'date', 'time'

icon

string

An optional icon, defa

disabled

Boolean

false

If the input should be disabled

Example

import {UIDateTimeFieldEditor} from 'writer'

render($$) {
   const el = $$('div')
   return el.append(
       $$(UIDateTimeFieldEditor, {
           node: this.props.node,
           field: 'title',
           placeholder: this.getLabel('Add title here')
       })
   )
}

Last updated