Platform: Date Picker Component Technical Design - SAP/fundamental-ngx GitHub Wiki

Date Picker

Summary

The DatePicker is an input component for selecting a date or date range.

See Fundamental NGX:Core implementation of Date Picker.

Platform vs. Core Implementation

  • The Platform Date Picker component will implement the FormFieldControl interface, thus can be used with in the FormField component.

Example

<fdp-date-picker
  [(ngModel)]="startDate"
  [type]="'single'"
  [format]="MM/dd/yyyy"
  [compact]="true"
  [state]="'valid'"
  [disabled]="true"
  >
</fdp-date-picker>

Design

The Platform DatePicker component will be a wrapper around the Core DatePicker component, and should use the Core component, fd-date-picker in its template. As such, the bindings for the Platform DatePicker component are the are the same as the bindings for the Core DatePicker component and should be passed down to the Core component.

As this is an input control it needs to implement the FormFieldControl as described in the FormGroup Layout or extend existing BaseInputComponent.


i18n

Link to general support for i18n: Supporting internationalization in ngx/platform

Core's Datepicker is handling i18n in its own way: core internationalization

Special Usecase: No

Redesign Required: No


Notes

Manju:

  1. Detailed documentation required, like we have it for other components