---
title: "Angular Calendar Date Picker Example | Mobiscroll"
component: "Calendar"
framework: "Angular"
library_version: "6.2.0"
url: "https://demo.mobiscroll.com/angular/calendar/date-picker"
---

# Date Picker - Angular Calendar demo

Embed an inline monthly calendar in an Angular date picker for single-date selection — ideal for booking forms and reservation interfaces.

- [Live demo](https://demo.mobiscroll.com/angular/calendar/date-picker)
- [View code on GitHub](https://github.com/acidb/mobiscroll-demos-angular/tree/main/src/demos/datepicker/calendar/date-picker)
- This demo in other frameworks: [JavaScript](https://demo.mobiscroll.com/calendar/date-picker.md), [jQuery](https://demo.mobiscroll.com/jquery/calendar/date-picker.md), [React](https://demo.mobiscroll.com/react/calendar/date-picker.md), [Vue](https://demo.mobiscroll.com/vue/calendar/date-picker.md)

## Description

The date picker ships with five built-in variations for rendering the UI. The [`controls` option](https://mobiscroll.com/docs/angular/datepicker/api#opt-controls) supports the following:

- `date` - renders a date-only scroller or dropdown control
- `time` - renders a time-only scroller or dropdown control
- `timegrid` - renders a time grid for time selection
- `datetime` - renders a date & time scroller or dropdown
- `calendar` - renders a calendar view for date picking

When passing `controls: ['calendar']`, the date picker will render a monthly calendar for selecting a date.

**Interested in dynamically switching between modes?** [Learn how to set up responsive behavior →](https://demo.mobiscroll.com/angular/calendar/responsive)

## What this demo shows

- A monthly date picker for selecting a single date.
- **Inline date picker** The date picker is embedded directly in the page without an input by using inline display mode.
- **Header navigation** The month and year label in the top left opens a month and year picker. The blue previous and next arrow buttons on the right navigate between months.
- **Month view** A fixed weekday header displays abbreviated day names from Sunday through Saturday, with the dates arranged in a grid below it.
- **Month navigation** The month can be changed by clicking and dragging the calendar left or right.
- **Day cell states** Hovering a day highlights the day number with a gray background. Selecting a day highlights the day number with a blue background. The current date is highlighted by default and remains blue when the user selects another date.
- **Adjacent months** Dates from the previous and next months appear with a muted style. Selecting one navigates the calendar to the corresponding month.

## Best for

- **Single-date selection** Choosing one date from a monthly calendar while keeping surrounding dates and the day-of-week layout visible.

## Tutorial

```html
<mbsc-datepicker
    [controls]="['calendar']">
</mbsc-datepicker>
```

## API used in this demo

- [`theme`](https://mobiscroll.com/docs/angular/datepicker/api#opt-theme) - option
- [`themeVariant`](https://mobiscroll.com/docs/angular/datepicker/api#opt-themeVariant) - option
- [`controls`](https://mobiscroll.com/docs/angular/datepicker/api#opt-controls) - option
- [`display`](https://mobiscroll.com/docs/angular/datepicker/api#opt-display) - option

## Code

### Component

```ts
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { MbscModule, setOptions } from '@mobiscroll/angular';

setOptions({
  theme: 'ios',
  themeVariant: 'light'
});

@Component({
  selector: 'app-root', 
  templateUrl: './app.component.html',
  standalone: true,
  imports: [CommonModule, MbscModule],
})
export class AppComponent {}
```

### Template

```html
<mbsc-datepicker [controls]="['calendar']" display="inline"></mbsc-datepicker>
```

## Implementation notes

- `controls: ['calendar']` renders the monthly calendar view - this is the default control, so it doesn't need to be set explicitly unless overriding another value. Set `display: 'inline'` to embed the calendar directly in the page instead of opening it in a modal/popup.

## Run it in your project

1. If not signed up yet, or don't own a license, you can [start a free trial](https://mobiscroll.com/starttrial).

2. Clone the repository:

   ```
   git clone https://github.com/acidb/mobiscroll-demos-angular.git
   ```

3. If not installed yet, install the Mobiscroll CLI from NPM:

   ```
   npm install -g @mobiscroll/cli
   ```

4. Config Mobiscroll - open a terminal window in the root directory and run:

   ```
   mobiscroll config angular
   ```

5. Install dependencies - open a terminal window in the root directory and run:

   ```
   npm install
   ```

6. Run the project:

   ```
   ng serve
   ```

On a trial, add `--trial` to the config command: `mobiscroll config angular --trial`.

Running a demo locally requires a Mobiscroll trial or a license; setup is per framework at https://mobiscroll.com/docs/angular/getting-started/installation

## Related demos

- Next: [Date & Time Picker](https://demo.mobiscroll.com/angular/calendar/date-time-picker.md) - Select a date and time side-by-side with the Angular date picker — use the scroller for exact times or time grid for 30-minute appointment slots.
