src/modules/date-picker/components/date-picker.component.ts
Component to display the stark date-picker
OnInit
AfterViewInit
OnChanges
OnDestroy
ControlValueAccessor
Validator
MatFormFieldControl
encapsulation | ViewEncapsulation.None |
host | { |
providers |
{
provide: NG_VALIDATORS, useExisting: StarkDatePickerComponent, multi: true
}
{
provide: MatFormFieldControl, useExisting: StarkDatePickerComponent
}
|
selector | stark-date-picker |
templateUrl | ./date-picker.component.html |
Properties |
|
Methods |
|
Inputs |
Outputs |
Accessors |
Public
constructor(logger: StarkLoggingService, renderer: Renderer2, elementRef: ElementRef
|
||||||||||||||||||||||||||||||||||||
Class constructor
Parameters :
|
dateFilter | |
Type : StarkDatePickerFilter | undefined
|
|
Filter function or a string Whenever this value is changed, we set the dateFilter |
dateMask | |
Type : StarkDatePickerMaskConfig
|
|
Timestamp Mask Configuration to apply on the date-picker.
|
disabled | |
Type : boolean
|
|
Whether the datepicker is disabled |
max | |
Type : moment.Moment | null
|
|
Maximum date of the date picker Supported types: |
min | |
Type : moment.Moment | null
|
|
Minimum date of the date picker Supported types: |
pickerId | |
Type : string
|
|
Default value : ""
|
|
The HTML |
pickerName | |
Type : string
|
|
Default value : ""
|
|
HTML |
placeholder | |
Type : string
|
|
Placeholder to be displayed in the datepicker. This is dynamically translated via the @ngx-translate service if the provided text is defined in the translation keys). |
required | |
Type : boolean
|
|
If the date-picker is required or not. Default: |
value | |
Type : Date | null
|
|
Source Date to be bound to the datepicker model |
color | |
Type : string
|
|
Inherited from
AbstractStarkUiComponent
|
|
Defined in
AbstractStarkUiComponent:16
|
|
Color theme |
dateChange | |
Type : EventEmitter
|
|
Output that will emit a specific date whenever the selection has changed |
dateInput | |
Type : EventEmitter
|
|
Output that will emit a specific date whenever the input has changed |
Public filterOnlyWeekdays | ||||||||
filterOnlyWeekdays(date: Date)
|
||||||||
Filter only the week days
Parameters :
Returns :
boolean
Whether the date is a week day or not |
Public filterOnlyWeekends | ||||||||
filterOnlyWeekends(date: Date)
|
||||||||
Filter only the weekend days
Parameters :
Returns :
boolean
Whether the date is a weekend day or not |
Public getTimestampMaskConfig |
getTimestampMaskConfig()
|
Get the
Returns :
StarkTimestampMaskConfig | undefined
|
Public ngAfterViewInit |
ngAfterViewInit()
|
Component lifecycle hook
Returns :
void
|
Public ngOnChanges | ||||||||
ngOnChanges(changes: SimpleChanges)
|
||||||||
Component lifecycle hook
Parameters :
Returns :
void
|
Public ngOnDestroy |
ngOnDestroy()
|
Component lifecycle hook
Returns :
void
|
Public ngOnInit |
ngOnInit()
|
Inherited from
AbstractStarkUiComponent
|
Defined in
AbstractStarkUiComponent:504
|
Component lifecycle hook
Returns :
void
|
Public onBlur |
onBlur()
|
Method triggered when the date-picker input is blurred. This method disables the starkTimestampInput directive.
Returns :
void
|
Public onDateChange | ||||||||
onDateChange(event: MatDatepickerInputEvent
|
||||||||
Handled when a
Parameters :
Returns :
void
|
Public onDateInput | ||||||||
onDateInput(event: MatDatepickerInputEvent
|
||||||||
Handled when an
Parameters :
Returns :
void
|
Public onFocus | ||||||||
onFocus(focusEvent: FocusEvent)
|
||||||||
Method triggered when the date-picker input is focused. This method changes the displayed value to make the starkTimestampInput directive working and enables the directive.
Parameters :
Returns :
void
|
Public logger |
Type : StarkLoggingService
|
Decorators :
@Inject(STARK_LOGGING_SERVICE)
|
- The `StarkLoggingService` instance of the application.
|
Static ngAcceptInputType_dateMask |
Type : BooleanInput | StarkDatePickerMaskConfig
|
Static ngAcceptInputType_disabled |
Type : BooleanInput
|
Static ngAcceptInputType_max |
Type : StarkDateInput
|
Static ngAcceptInputType_min |
Type : StarkDateInput
|
Static ngAcceptInputType_required |
Type : BooleanInput
|
Public picker |
Type : MatDatepicker<moment.Moment>
|
Decorators :
@ViewChild(MatDatepicker, {static: true})
|
Reference to the MatDatepicker embedded in this component |
Public pickerInput |
Type : MatDatepickerInput<moment.Moment>
|
Decorators :
@ViewChild(MatDatepickerInput, {static: true})
|
Reference to the MatDatepickerInput embedded in this component |
dateFilter | ||||||
getdateFilter()
|
||||||
Filter function or a string Whenever this value is changed, we set the dateFilter
Returns :
StarkDatePickerFilter | undefined
|
||||||
setdateFilter(value: StarkDatePickerFilter | undefined)
|
||||||
Parameters :
Returns :
void
|
dateMask | ||||||
setdateMask(value: StarkDatePickerMaskConfig)
|
||||||
Timestamp Mask Configuration to apply on the date-picker.
Parameters :
Returns :
void
|
disabled | ||||||
getdisabled()
|
||||||
Whether the datepicker is disabled
Returns :
boolean
|
||||||
setdisabled(value: boolean)
|
||||||
Parameters :
Returns :
void
|
max | ||||||
getmax()
|
||||||
setmax(value: moment.Moment | null)
|
||||||
Maximum date of the date picker Supported types:
Parameters :
Returns :
void
|
min | ||||||
getmin()
|
||||||
setmin(value: moment.Moment | null)
|
||||||
Minimum date of the date picker Supported types:
Parameters :
Returns :
void
|
placeholder | ||||||
getplaceholder()
|
||||||
setplaceholder(value: string)
|
||||||
Placeholder to be displayed in the datepicker. This is dynamically translated via the @ngx-translate service if the provided text is defined in the translation keys).
Parameters :
Returns :
void
|
required | ||||||
getrequired()
|
||||||
If the date-picker is required or not. Default:
Returns :
boolean
|
||||||
setrequired(value: boolean)
|
||||||
Parameters :
Returns :
void
|
value | ||||||
getvalue()
|
||||||
Source Date to be bound to the datepicker model
Returns :
Date | null
|
||||||
setvalue(value: Date | null)
|
||||||
Parameters :
Returns :
void
|