ng2-datepicker
ng2-datepicker copied to clipboard
Options are ignored when custom input is used
Options are ignored when I add [headless]="true"
datePickerOptions: DatepickerOptions = { displayFormat: 'DD.MM.YYYY', barTitleFormat: 'MMMM YYYY', dayNamesFormat: 'dd', firstCalendarDay: 0, // 0 - Sunday, 1 - Monday locale: frLocale, minDate: new Date(this.availableFromDateData.getMinValue()), maxDate: new Date(this.availableFromDateData.getMaxValue()) };
<input type="text" name="date" [(ngModel)]="date" (click)="picker1.toggle()"/> <ng-datepicker [headless]="true" #picker1 [(ngModel)]="date" [options]="datePickerOptions">
i’ll check in a few minutes.
On 7 February 2018 at 09:12:20, irynaslisava ([email protected]) wrote:
Options are ignored when I add [headless]="true"
datePickerOptions: DatepickerOptions = { displayFormat: 'DD.MM.YYYY', barTitleFormat: 'MMMM YYYY', dayNamesFormat: 'dd', firstCalendarDay: 0, // 0 - Sunday, 1 - Monday locale: frLocale, minDate: new Date(this.availableFromDateData.getMinValue()), maxDate: new Date(this.availableFromDateData.getMaxValue()) };
<input type="text" name="date" [(ngModel)]="date" (click)="picker1.toggle()"/> <ng-datepicker [headless]="true" #picker1 [(ngModel)]="date" [options]="datePickerOptions">
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bleenco/ng2-datepicker/issues/304, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtntjTFugna5jUuNfqD_F9WIR9v4qeyks5tSVrkgaJpZM4R8TFR .
why would you like to use custom input and not just change the style of existing one if needed?
I need datepicker enabled for both to choose date in calendar-dropdown or via manual entry.
@irynaslisava did you try set any dummy name attribute to ng-datepicker? In case of version 2.2.5 there is no problem.