Using UIKit Block Elements
},
value: 'option_1',
},
{
text: {
type: 'plain_text',
text: 'Option 2',
},
value: 'option_2'
}]}]}, The following screenshot shows the checkbox element displayed on the UI: Add date picker and time picker elements Add the following code to the messageCreator.setBlocks parameter: {
type: 'actions', // the action block
blockId: 'action_block_5',
elements: [ // the elements parameter contains the date picker block element definition
{
type: 'datepicker',
appId: appId,
blockId: 'date_block_1',
actionId: 'date_action_1',
}]},
{
type: 'actions', // another action block that contains the time picker element definition
appId: appId,
blockId: 'action_block_6',
elements: [{
type: 'time_picker',
actionId: 'time_picker_action_1',
appId: appId,
blockId: 'time_picker_action_block_1',
}]}, The following screenshot shows what the date picker element looks like on the UI: The following screenshot shows the time picker element: