CoreUI Angular Logo
Framework:
  • JavaScript / Vanilla JS
  • React.js
  • Vue.js
Getting startedIntroductionSupport CoreUICustomizeSassOptionsCSS VariablesLayoutBreakpointsContainersGridColumnsGuttersFormsOverviewDate PickerPRODate Range PickerPROForm ControlSelectMulti SelectPROChecks & RadiosPassword InputPRORangeRange SliderPRORatingPROStepperPROInput GroupFloating LabelsLayoutTime PickerPROValidationComponentsAccordionAlertAvatarBadgeBreadcrumbButtonButton GroupCalendarPROCalloutCardCarouselClose buttonCollapseDropdownFooterHeaderImageList GroupLoading ButtonPROModalNavNavbarOffcanvasPaginationPlaceholderPopoverProgressSmart PaginationPROSmart TablePROSidebarSpinnerTableTabsNewToastTooltipWidgetsIconsChartsTemplatesNewAdmin & DasardDownloadInstallationCustomizeContentMigrationv4 → v5v3 → v4Angular version


DownloadHire UsGet CoreUI PRO
On this page
  • Examples
  • With footer
  • Sizing
  • Disabled
  • Readonly
  • Format
  • Disabled dates
  • Non-english locale
  • Auto
  • Chinese
  • Japanese
  • Korean
  • Right to left support
  • Hebrew
  • Persian
  • Forms
  • Reactive
  • Template-driven
  • API reference
  • DatePicker Module
  • c-date-picker
CoreUI PRO for AngularThis component is part of CoreUI PRO – a powerful UI library with over 250 components and 25+ templates, designed to help you build modern, responsive apps faster. Fully compatible with Angular, Bootstrap, React.js, and Vue.js.Get CoreUI PRO

Angular Date Picker Component

Create consistent cross-browser and cross-device Angular date picker.

Examples

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<c-row>
  <c-col lg="4">
    <c-date-picker closeOnSelect />
  </c-col>

  <c-col lg="4">
    <c-date-picker [date]="date" [showAdjacentDays]="false"/>
  </c-col>
</c-row>
import { Component } from '@angular/core';
import { ColComponent, DatePickerComponent, RowComponent } from '@coreui/angular';

@Component({
  selector: 'docs-date-picker01',
  templateUrl: './date-picker01.component.html',
  standalone: true,
  imports: [RowComponent, ColComponent, DatePickerComponent]
})
export class DatePicker01Component {

  public date = new Date();

}

With footer

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
Jun 17, 2025
<c-row>
  <c-col lg="4">
    <c-date-picker
      [(date)]="date"
      #datePicker="cDatePicker"
      [calendarDate]="calendarDate"
    >
      <ng-template cTemplateId="datePickerFooter" let-dropdown>
        <button cButton color="danger" variant="ghost" size="sm" (click)="onToday();" class="me-auto">Today</button>
        <button cButton color="primary" size="sm" (click)="onCancel()" cDropdownClose [dropdownComponent]="dropdown">Cancel</button>
        <button cButton color="primary" size="sm" [disabled]="!date" cDropdownClose [dropdownComponent]="dropdown">OK
        </button>
      </ng-template>
    </c-date-picker>
  </c-col>
  <c-col class="d-flex align-items-center">
    {{date | date}}
  </c-col>
</c-row>
import { Component } from '@angular/core';
import { DatePipe } from '@angular/common';
import {
  ButtonDirective,
  ColComponent,
  DatePickerComponent,
  DropdownCloseDirective,
  RowComponent,
  TemplateIdDirective
} from '@coreui/angular';

@Component({
  selector: 'docs-date-picker02',
  templateUrl: './date-picker02.component.html',
  standalone: true,
  imports: [
    RowComponent,
    ColComponent,
    DatePickerComponent,
    TemplateIdDirective,
    ButtonDirective,
    DropdownCloseDirective,
    DatePipe
  ]
})
export class DatePicker02Component {
  public date?: Date | null = new Date();
  public calendarDate = new Date(Date.now());

  onToday() {
    this.calendarDate = new Date(Date.now());
  }

  onCancel() {
    this.date = null;
  }
}

Sizing

Set heights using size property like size="lg" and size="sm".

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
<c-row class="mb-4">
  <c-col lg="5">
    <c-date-picker size="lg" />
  </c-col>
</c-row>

<c-row>
  <c-col lg="4">
    <c-date-picker size="sm" />
  </c-col>
</c-row>

Disabled

Add the disabled boolean attribute on an input to give it a grayed out appearance and remove pointer events.

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
<c-row>
  <c-col lg="4">
    <c-date-picker disabled />
  </c-col>
</c-row>

Readonly

Add the inputReadOnly boolean attribute to prevent modification of the input value.

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
<c-row>
  <c-col lg="4">
    <c-date-picker inputReadOnly />
  </c-col>
</c-row>

Format

Control the format of the date displayed in the input using the format property according to locale rules. Makes the date input read-only.

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
<c-row>
  <c-col lg="4">
    <c-date-picker locale="es" format="dd MMMM yyy" closeOnSelect />
  </c-col>
</c-row>
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { registerLocaleData } from '@angular/common';
import localeEs from '@angular/common/locales/es';

import { ColComponent, DatePickerComponent, RowComponent } from '@coreui/angular';

registerLocaleData(localeEs);     // es-ES

@Component({
  selector: 'docs-date-picker15',
  templateUrl: './date-picker15.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
  standalone: true,
  imports: [RowComponent, ColComponent, DatePickerComponent]
})
export class DatePicker15Component {}

Disabled dates

Add dates user cannot select using the disabledDates property.

28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
<c-row>
  <c-col lg="4">
    <c-date-picker
      [calendarDate]="calendarDate"
      [disabledDates]="disabledDates"
      locale="de-AT"
      [maxDate]="maxDate"
      [minDate]="minDate"
      [dateFilter]="dateFilter"
    />
  </c-col>
</c-row>
import { Component } from '@angular/core';
import { ColComponent, DatePickerComponent, RowComponent } from '@coreui/angular';

@Component({
  selector: 'docs-date-picker06',
  templateUrl: './date-picker06.component.html',
  standalone: true,
  imports: [RowComponent, ColComponent, DatePickerComponent]
})
export class DatePicker06Component {

  public calendarDate = new Date(2022, 2, 1);
  public disabledDates = [
    [new Date(2022, 2, 4), new Date(2022, 2, 7)], // range of dates that cannot be selected
    new Date(2022, 2, 16), // single date that cannot be selected
    new Date(2022, 3, 16),
    [new Date(2022, 4, 2), new Date(2022, 4, 8)]
  ];
  public maxDate = new Date(2022, 5, 0);
  public minDate = new Date(2022, 0, 1);

  dateFilter = (date: Date | null): boolean => {
    const day = date?.getDay();
    return day !== 0;
  };
}

Non-english locale

Auto

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
<c-row>
  <c-col lg="4">
    <c-date-picker />
  </c-col>
</c-row>

Chinese

26日
27日
28日
29日
30日
31日
1日
2日
3日
4日
5日
6日
7日
8日
9日
10日
11日
12日
13日
14日
15日
16日
17日
18日
19日
20日
21日
22日
23日
24日
25日
26日
27日
28日
29日
30日
1日
2日
3日
4日
5日
6日
<c-row>
  <c-col lg="4">
    <c-date-picker placeholder="入住日期" locale="zh-CN" />
  </c-col>
</c-row>

Japanese

26日
27日
28日
29日
30日
31日
1日
2日
3日
4日
5日
6日
7日
8日
9日
10日
11日
12日
13日
14日
15日
16日
17日
18日
19日
20日
21日
22日
23日
24日
25日
26日
27日
28日
29日
30日
1日
2日
3日
4日
5日
6日
<c-row>
  <c-col lg="4">
    <c-date-picker placeholder="日付を選択" locale="ja" />
  </c-col>
</c-row>

Korean

26일
27일
28일
29일
30일
31일
1일
2일
3일
4일
5일
6일
7일
8일
9일
10일
11일
12일
13일
14일
15일
16일
17일
18일
19일
20일
21일
22일
23일
24일
25일
26일
27일
28일
29일
30일
1일
2일
3일
4일
5일
6일
<c-row>
  <c-col lg="4">
    <c-date-picker placeholder="날짜 선택" locale="ko" navYearFirst />
  </c-col>
</c-row>

Right to left support

RTL support is built-in and can be explicitly controlled through the $enable-rtl variables in scss.

Hebrew

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
<c-row>
  <c-col lg="4">
    <div dir="rtl">
      <c-date-picker locale="he-IL" placeholder="בחר תאריך" weekdayFormat="narrow" />
    </div>
  </c-col>
</c-row>

Persian

۵
۶
۷
۸
۹
۱۰
۱۱
۱۲
۱۳
۱۴
۱۵
۱۶
۱۷
۱۸
۱۹
۲۰
۲۱
۲۲
۲۳
۲۴
۲۵
۲۶
۲۷
۲۸
۲۹
۳۰
۳۱
۱
۲
۳
۴
۵
۶
۷
۸
۹
۱۰
۱۱
۱۲
۱۳
۱۴
۱۵
<c-row>
  <c-col lg="4">
    <div dir="rtl">
      <c-date-picker inputReadOnly locale="fa-IR" placeholder="تاریخ شروع" weekdayFormat="narrow" />
    </div>
  </c-col>
</c-row>

Forms

Angular handles user input through reactive and template-driven forms. CoreUI Date Picker supports both options.

Reactive

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6

Form value: { "datePicker": "2025-06-16T22:00:00.000Z" }
datePicker value: 6/17/2025
<c-row>
  <c-col lg="4">
    <form [formGroup]="formGroup">
      <c-date-picker formControlName="datePicker" />
    </form>
  </c-col>
</c-row>
<br>
Form value: {{ formGroup.value | json }}
<br>
datePicker value: {{ toLocaleDateString }}
import { JsonPipe } from '@angular/common';
import { Component, OnInit, signal } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { ColComponent, DatePickerComponent, RowComponent } from '@coreui/angular';

interface IDatePickerForm {
  datePicker: FormControl<Date | undefined | null>;
}

@Component({
  selector: 'docs-date-picker13',
  templateUrl: './date-picker13.component.html',
  standalone: true,
  imports: [RowComponent, ColComponent, ReactiveFormsModule, DatePickerComponent, JsonPipe]
})
export class DatePicker13Component implements OnInit {
  date = new Date();

  formGroup!: FormGroup<IDatePickerForm>;

  readonly #toLocaleDateString = signal('');

  get toLocaleDateString() {
    return this.#toLocaleDateString();
  }

  ngOnInit(): void {
    const date = new Date(this.date.getFullYear(), this.date.getMonth(), this.date.getDate());

    this.formGroup = new FormGroup<IDatePickerForm>({
      datePicker: new FormControl(date, { nonNullable: false })
    });

    this.formGroup.valueChanges.subscribe((value) => {
      this.#toLocaleDateString.set(value.datePicker?.toLocaleDateString() ?? '');
    });
  }
}

Template-driven

26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6

Form value: { "datePicker": "2025-06-17T22:00:00.000Z" }
datePicker value: Wednesday, June 18, 2025
<c-row>
  <c-col lg="4">
    <form #form="ngForm">
      <c-date-picker [(ngModel)]="date" name="datePicker" />
    </form>
  </c-col>
</c-row>
<br>
Form value: {{ form.value | json }}
<br>
datePicker value: {{ form.value['datePicker'] | date:'fullDate'}}
import { DatePipe, JsonPipe } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ColComponent, DatePickerComponent, RowComponent } from '@coreui/angular';

@Component({
  selector: 'docs-date-picker14',
  templateUrl: './date-picker14.component.html',
  standalone: true,
  imports: [RowComponent, ColComponent, ReactiveFormsModule, FormsModule, DatePickerComponent, JsonPipe, DatePipe]
})
export class DatePicker14Component implements OnInit {
  date!: Date;

  ngOnInit(): void {
    const date = new Date();
    this.date = new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1);
  }
}

API reference

DatePicker Module

import { 
 DatePickerModule,
 DropdownModule,
 SharedModule
} from '@coreui/angular';

@NgModule({
   imports: [
     DatePickerModule,
     DropdownModule,
     SharedModule
   ]
})
export class AppModule() { }

c-date-picker

component

Inputs
namedescriptiontypedefault
dateInitial selected date.Dateundefined
calendarDateDefault date month of the component.Dateundefined
cleanerToggle visibility or set the content of the cleaner button.booleantrue
closeOnSelectDetermine if dropdown should be closed when component value is set.booleanfalse
disabledToggle the disabled state for the component.booleanfalse
disabledDatesList of dates that cannot be selected.(Date | Date[])[]undefined
firstDayOfWeekSets the day of start week.number1
format
Formats a date display. See: DatePipe format options. Makes the input read-only.stringundefined
disabledToggle the disabled state for the component.booleanfalse
indicatorToggle visibility or set the content of the input indicator.booleantrue
inputReadOnlyToggle the readonly state for the input.booleanfalse
localeSets the default locale for components. If not set, it is inherited from the browser.stringdefault
maxDateMax selectable date.Dateundefined
minDateMin selectable date.Dateundefined
navYearFirstReorder year-month navigation, and render year first.booleanfalse
navigationShow arrows navigation.booleantrue
placeholderSpecifies hint visible in date input.stringSelect date
sizeSize the component input small or large.sm | lgundefined
dayFormatSet the format of day number.numeric | 2-digit | (date: Date) =&gt; string | numbernumeric
weekdayFormatSet length or format of day name,number | long | narrow | short2
selectAdjacentDays
Days in adjacent months shown before or after the current month are selectable. This only applies if the showAdjacentDays option is set to true.booleanfalse
showAdjacentDays
Display dates in adjacent months (non-selectable) at the start/end of the current month.booleantrue
validSet input validation visual feedback.booleanundefined
showWeekNumberDisplay ISO week numbers in month view.booleanundefined
weekNumbersLabelLabel displayed over week numbers in the calendar.stringundefined
inputDateFormatCustom function to format the selected date into a string according to a custom format.(date: Date) =&gt; stringundefined
inputDateParseCustom function to parse the input value into a valid Date object.`(date: stringDate) => Date`
Outputs
namedescriptiontype
dateChangeEvent emitted on date changeDate
calendarCellHoverEvent emitted on calendar cell hoverDate
calendarDateChangeEvent emitted on calendar month changeDate
valueChangeEvent emitted on value changeDate
  • Twitter
  • Support
  • CoreUI (Vanilla)
  • CoreUI for React.js
  • CoreUI for Vue.js

CoreUI for Angular is Open Source UI Components Library for Angular.

Currently v5.5.2 Code licensed MIT , docs CC BY 3.0 .
CoreUI PRO requires a commercial license.