pub struct DatePickerElementBuilder { /* private fields */ }Expand description
Consuming builder for DatePickerElement. Validation runs in Self::build.
Implementations§
Source§impl DatePickerElementBuilder
impl DatePickerElementBuilder
Sourcepub fn action_id(self, value: impl Into<String>) -> Self
pub fn action_id(self, value: impl Into<String>) -> Self
Sets the identifier Slack returns in interaction payloads when a user acts on this element. It must be unique among the elements of its block.
Sourcepub fn clear_action_id(self) -> Self
pub fn clear_action_id(self) -> Self
Omits action_id, including any model default.
Sourcepub fn initial_date(self, value: impl Into<String>) -> Self
pub fn initial_date(self, value: impl Into<String>) -> Self
Sets the initially selected date, formatted as YYYY-MM-DD.
Sourcepub fn clear_initial_date(self) -> Self
pub fn clear_initial_date(self) -> Self
Omits initial_date, including any model default.
Sourcepub fn confirm(self, value: impl Into<ConfirmationDialogue>) -> Self
pub fn confirm(self, value: impl Into<ConfirmationDialogue>) -> Self
Sets a confirmation dialog shown before the action is sent.
Sourcepub fn clear_confirm(self) -> Self
pub fn clear_confirm(self) -> Self
Omits confirm, including any model default.
Sourcepub fn focus_on_load(self, value: bool) -> Self
pub fn focus_on_load(self, value: bool) -> Self
Sets whether the element receives focus when the view opens. Only one element per view may do so.
Sourcepub fn clear_focus_on_load(self) -> Self
pub fn clear_focus_on_load(self) -> Self
Omits focus_on_load, including any model default.
Sourcepub fn placeholder(self, value: impl Into<PlainTextInput>) -> Self
pub fn placeholder(self, value: impl Into<PlainTextInput>) -> Self
Sets the placeholder text shown before a value is chosen.
Sourcepub fn clear_placeholder(self) -> Self
pub fn clear_placeholder(self) -> Self
Omits placeholder, including any model default.
Sourcepub fn extension(self, key: impl Into<String>, value: impl Into<Value>) -> Self
pub fn extension(self, key: impl Into<String>, value: impl Into<Value>) -> Self
Adds or replaces an unmodeled extension; reserved names fail at build time.
Sourcepub fn build(self) -> Result<DatePickerElement, ValidationError>
pub fn build(self) -> Result<DatePickerElement, ValidationError>
Validates all fields and their receiving context.
§Errors
Returns a ValidationError for missing fields, invalid values, reserved
extension names, or unsupported field combinations and child contexts.