# CalendarDatePickerDateValidationErrorEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-calendardatepickerdatevalidationerroreventargs/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct CalendarDatePickerDateValidationErrorEventArgs
```

Provides data for the `DateValidationError` event of the
`CalendarDatePicker`.

A copy shares the state of the args it was made from, so that what a
handler decides reaches the control that raised the event.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar_date_picker/calendar_date_picker_date_validation_error_event_args.rs#L19)

## Members

- [`new`](#function-new)
- [`exception`](#function-exception)
- [`text`](#function-text)
- [`throw_exception`](#function-throw_exception)
- [`set_throw_exception`](#function-set_throw_exception)

<a id="function-new"></a>

### new

```rust
fn new(exception: Rc<dyn Error>, text: impl Into<String>) -> Self
```

Initializes a new instance of the
`CalendarDatePickerDateValidationErrorEventArgs` class.

`exception` is the initial exception from the `DateValidationError`
event and `text` the text that caused the event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar_date_picker/calendar_date_picker_date_validation_error_event_args.rs#L31)

<a id="function-exception"></a>

### exception

```rust
fn exception(self: &Self) -> &Rc<dyn Error>
```

Gets the initial exception associated with the
`DateValidationError` event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar_date_picker/calendar_date_picker_date_validation_error_event_args.rs#L37)

<a id="function-text"></a>

### text

```rust
fn text(self: &Self) -> &str
```

Gets the text that caused the `DateValidationError` event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar_date_picker/calendar_date_picker_date_validation_error_event_args.rs#L42)

<a id="function-throw_exception"></a>

### throw_exception

```rust
fn throw_exception(self: &Self) -> bool
```

Gets a value indicating whether the exception should be thrown: the
control then panics with the message of the exception.

If set to true, the control throws the exception when the text
cannot be parsed to a date or the date cannot be selected. The
default is false.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar_date_picker/calendar_date_picker_date_validation_error_event_args.rs#L52)

<a id="function-set_throw_exception"></a>

### set_throw_exception

```rust
fn set_throw_exception(self: &Self, value: bool)
```

Sets a value indicating whether the exception should be thrown.
(The args always have an exception, so the check of the reference
for a missing one has no counterpart.)

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar_date_picker/calendar_date_picker_date_validation_error_event_args.rs#L59)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `PartialEq`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
