File

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

Implements

ControlValueAccessor OnDestroy

Metadata

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(cdRef: ChangeDetectorRef)
Parameters :
Name Type Optional
cdRef ChangeDetectorRef No

Inputs

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

Outputs

dayBackward
Type : EventEmitter
dayForward
Type : EventEmitter

Methods

emitValue
emitValue()
Returns : void
handleHourScroll
handleHourScroll(ev)
Parameters :
Name Optional
ev No
Returns : void
handleMinuteScroll
handleMinuteScroll(ev)
Parameters :
Name Optional
ev No
Returns : void
initializeHours
initializeHours()
Returns : void
initializeMinutes
initializeMinutes()
Returns : void
markAsTouched
markAsTouched()
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
parseValue
parseValue(target, lastValid, limit)
Parameters :
Name Optional
target No
lastValid No
limit No
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
writeValue
writeValue(value: literal type)

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

Parameters :
Name Type Optional
value literal type No
Returns : void

Properties

date
Type : Date
Default value : new Date()
disabled
Default value : false
hours
Type : string
lastValidHours
Type : string
Default value : '00'
lastValidMinutes
Type : string
Default value : '00'
minutes
Type : string
onChange
Type : function
onTouched
Type : function
<table>
  <tbody>
    <tr>
      <td class="form-group">
        <input
          type="text"
          class="form-control text-center bs-timepicker-field"
          [disabled]="disabled"
          [placeholder]="'HH`HOURS`' | translate"
          [(ngModel)]="hours"
          (input)="parseValue('hours', 'lastValidHours', 23); initializeMinutes()"
          (change)="emitValue()"
          (wheel)="handleHourScroll($event)"
          (focus)="markAsTouched()"
        />
      </td>
      <td>&nbsp;:&nbsp;</td>
      <td class="form-group">
        <input
          type="text"
          class="form-control text-center bs-timepicker-field"
          [disabled]="disabled"
          [placeholder]="'MM`MINUTES`' | translate"
          [(ngModel)]="minutes"
          (input)="parseValue('minutes', 'lastValidMinutes', 59); initializeHours()"
          (change)="emitValue()"
          (wheel)="handleMinuteScroll($event)"
          (focus)="markAsTouched()"
        />
      </td>
    </tr>
  </tbody>
</table>

results matching ""

    No results matching ""