summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/block_element.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/slack-go/slack/block_element.go')
-rw-r--r--vendor/github.com/slack-go/slack/block_element.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/slack-go/slack/block_element.go b/vendor/github.com/slack-go/slack/block_element.go
index aba29c6b..a70d8f2d 100644
--- a/vendor/github.com/slack-go/slack/block_element.go
+++ b/vendor/github.com/slack-go/slack/block_element.go
@@ -9,6 +9,7 @@ const (
METOverflow MessageElementType = "overflow"
METDatepicker MessageElementType = "datepicker"
METTimepicker MessageElementType = "timepicker"
+ METDatetimepicker MessageElementType = "datetimepicker"
METPlainTextInput MessageElementType = "plain_text_input"
METRadioButtons MessageElementType = "radio_buttons"
METEmailTextInput MessageElementType = "email_text_input"
@@ -392,6 +393,29 @@ func NewTimePickerBlockElement(actionID string) *TimePickerBlockElement {
}
}
+// DateTimePickerBlockElement defines an element that allows the selection of both
+// a date and a time of day formatted as a UNIX timestamp.
+// More Information: https://api.slack.com/reference/messaging/block-elements#datetimepicker
+type DateTimePickerBlockElement struct {
+ Type MessageElementType `json:"type"`
+ ActionID string `json:"action_id,omitempty"`
+ InitialDateTime int64 `json:"initial_date_time,omitempty"`
+ Confirm *ConfirmationBlockObject `json:"confirm,omitempty"`
+}
+
+// ElementType returns the type of the Element
+func (s DateTimePickerBlockElement) ElementType() MessageElementType {
+ return s.Type
+}
+
+// NewDatePickerBlockElement returns an instance of a datetime picker element
+func NewDateTimePickerBlockElement(actionID string) *DateTimePickerBlockElement {
+ return &DateTimePickerBlockElement{
+ Type: METDatetimepicker,
+ ActionID: actionID,
+ }
+}
+
// EmailTextInputBlockElement creates a field where a user can enter email
// data.
// email-text-input elements are currently only available in modals.