# CalendarDateRange

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

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

```rust
struct CalendarDateRange
```

Represents a range of dates in a `Calendar`.

A range is a reference object: handles are `Rc<CalendarDateRange>` and
compare by identity.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar/calendar_date_range.rs#L17)

## Members

- [`new`](#function-new)
- [`new_range`](#function-new_range)
- [`start`](#function-start)
- [`end`](#function-end)

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

### new

```rust
fn new(day: DateTime) -> Rc<Self>
```

Initializes a new instance of the `CalendarDateRange` class with a
single date: `day` is the date to be represented by the range.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar/calendar_date_range.rs#L25)

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

### new_range

```rust
fn new_range(start: DateTime, end: DateTime) -> Rc<Self>
```

Initializes a new instance of the `CalendarDateRange` class with a
range of dates: `start` is the start of the range to be represented
and `end` the end of it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar/calendar_date_range.rs#L32)

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

### start

```rust
fn start(self: &Self) -> DateTime
```

Gets the first date in the represented range.

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

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

### end

```rust
fn end(self: &Self) -> DateTime
```

Gets the last date in the represented range.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/calendar/calendar_date_range.rs#L47)

## Trait implementations

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

## Availability

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