Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion projects/datepicker/src/lib/datepicker-options.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface DatepickerOptions {
calendarClass?: string;
scrollBarColor?: string;
enableKeyboard?: boolean;
disabled?: boolean;
}

export const DATEPICKER_OPTIONS = new InjectionToken<DatepickerOptions>('Datepicker config');
Expand All @@ -41,5 +42,6 @@ export const defaultOptions: DatepickerOptions = {
inputClass: '',
calendarClass: 'datepicker-default',
scrollBarColor: '#dfe3e9',
enableKeyboard: true
enableKeyboard: true,
disabled: false,
};
2 changes: 1 addition & 1 deletion projects/datepicker/src/lib/datepicker.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[class]="options.inputClass"
[placeholder]="options.placeholder"
readonly
(click)="toggle()"
(click)="!options.disabled && toggle()"
/>

<div class="calendar-container" *ngIf="isOpened">
Expand Down