An element which lets users easily select a date from a calendar style UI.

datepicker_element(id, placeholder = NULL, initial_date = NULL, confirm = NULL)

Arguments

id

character, an identifier for the action triggered when a menu option is selected.

placeholder

character, placeholder text shown on the datepicker. Default: NULL

initial_date

Date, The initial date that is selected when the element is loaded. This should be in the strftime format '%Y-%m-%d'. Default: NULL

confirm

block_confirm, defines an optional confirmation dialog after the button is clicked. Default: NULL

Value

block element class

Details

  • Works with block types: Section, Actions, Input

See also

Examples

datepicker_element(id = 'datepicker123',initial_date = "1990-04-28", placeholder = 'Select a date')
#> { #> "type": "datepicker", #> "placeholder": { #> "type": "plain_text", #> "text": "Select a date" #> }, #> "action_id": "datepicker123", #> "initial_date": "1990-04-28" #> }