File

core/date-time-picker/date-time-picker.component.ts

Implements

ControlValueAccessor Validator OnDestroy

Metadata

Index

Properties
Methods
Inputs
Accessors

Constructor

constructor()

Inputs

maxDate
Type : string
minDate
Type : string
placeholder
Type : string

Methods

nextDay
nextDay()
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
previousDay
previousDay()
Returns : void
registerOnChange
registerOnChange(fn: any)
Parameters :
Name Type Optional
fn any No
Returns : void
registerOnTouched
registerOnTouched(onTouched: any)
Parameters :
Name Type Optional
onTouched any No
Returns : void
setDisabledState
setDisabledState(disabled: boolean)
Parameters :
Name Type Optional
disabled boolean No
Returns : void
validate
validate(_control: AbstractControl)
Parameters :
Name Type Optional
_control AbstractControl No
Returns : ValidationErrors | null
writeValue
writeValue(value: string)

Control Value Accessor - If form value changes by external factor, update date property and internal form with new value.

Parameters :
Name Type Optional
value string No
Returns : void

Properties

date
Type : Date
defaultPlaceholder
Default value : gettext('Select a dateā€¦')
form
Type : FormGroup
maxDate
Type : Date
minDate
Type : Date
onChange
Type : function
onTouched
Type : function

Accessors

_minDate
set_minDate(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
_maxDate
set_maxDate(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
<div class="datetime-picker">
  <div class="form-group datepicker">
    <input
      class="form-control"
      [placeholder]="placeholder || defaultPlaceholder | translate"
      bsDatepicker
      [bsConfig]="{ customTodayClass: 'today', dateInputFormat: 'YYYY-MM-DD' }"
      [formControl]="form.get('date')"
      (blur)="onTouched()"
      [minDate]="minDate"
      [maxDate]="maxDate"
    />
  </div>
  <c8y-time-picker
    [formControl]="form.get('time')"
    (dayBackward)="previousDay()"
    (dayForward)="nextDay()"
  ></c8y-time-picker>
</div>

results matching ""

    No results matching ""