Skip to main content

upp-date

A date selector component that opens a modal and supports two input modes:

  • manual typing (DD/MM/YYYY)
  • calendar selection (mat-calendar)

It is designed to work consistently on mobile and desktop, uses a full-screen modal on mobile, and supports Angular Reactive Forms through ControlValueAccessor.

When to Use

  • You need date selection with both keyboard and calendar interaction.
  • You want a reusable widget instead of repeating ad-hoc date modal code.
  • You need form integration with formControlName.

Demo

Source Code

<ion-item lines="none" [formGroup]="form">
<upp-date
formControlName="date"
title="Start date"
placeholder="DD/MM/YYYY"
></upp-date>
</ion-item>

API Reference

UppDateComponent (upp-date, alias upp-date-picker)

PropertyTypeDefaultDescription
formControlNamestring''Form control name in a parent FormGroup.
disabledbooleanfalseDisables opening the picker.
placeholderstring''Placeholder when no date is selected.
titlestring''Title shown in trigger and modal header.
minstring | nullnullMinimum date in ISO format (YYYY-MM-DD) for the calendar.
maxstring | nullnullMaximum date in ISO format (YYYY-MM-DD) for the calendar.
iconstring'calendar-clear-outline'Ionicon name shown on the trigger button.

Outputs

EventPayloadDescription
Changedstring | nullEmitted when the selected date changes.