# getDateSameOrBetween Type documentation

## TypeScript declaration

### [getDateSameOrBetween](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L734-L745>)

**Kind:** constant

```
import { getDateSameOrBetween } from '@siemens/element-ng/datepicker';
```

Get a date which is in within the range and the close to current.

```
(current: Date, minDate?: Date | undefined, maxDate?: Date | undefined) => Date = ...
```

```
getDateSameOrBetween(current: Date, minDate?: Date, maxDate?: Date): Date
```

Get a date which is in within the range and the close to current.

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [current](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L734-L734>) | `Date` |  |  |
| [minDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L734-L734>) (optional) | `Date` |  |  |
| [maxDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L734-L734>) (optional) | `Date` |  |  |

**Returns:** [Date](<https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date>)
