# addMonthsInRange Type documentation

## TypeScript declaration

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

**Kind:** constant

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

Get date delta specifically for months based on the offset.

Returns: a new date object with the updated month.

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

```
addMonthsInRange(current: Date, monthsOffset: number, minDate?: Date, maxDate?: Date): Date
```

Get date delta specifically for months based on the offset.

Returns: a new date object with the updated month.

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [current](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L437-L437>) | `Date` |  | • starting date. |
| [monthsOffset](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L438-L438>) | `number` |  | • numeric offset of months. |
| [minDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L439-L439>) (optional) | `Date` |  | • optional minimum allowed date. |
| [maxDate](<https://github.com/siemens/element/blob/main/projects/element-ng/datepicker/date-time-helper.ts#L440-L440>) (optional) | `Date` |  | • optional maximum allowed date. |

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