Open ArtemRomanovsky opened 4 years ago
I solved this problem with momentjs
this.min = moment().subtract(1, 'months').startOf('month').toDate();
this.max = moment().add(1, 'months').endOf('month').toDate();
Using a moment, you can generate a valid date and use it inside your html component with min and max attributes
@IvanPalekhin-Romanov thanks a lot!
how to use a single calendar for multiple uses like only for hour, day, month, year, week(must select/highlight 7days), month(must select/highlight the whole month ) in one calendar, instead of many calendars?? @akveo-private
Issue type
I'm submitting a ... (check one with "x")
Issue description
I just updated our package.json to use the last Nebular version 6.1.0 to see if the bug with the calendar and datepicker component is gone but as you can see from the below screenshot, I still have the same issue
To replicate simply use: <nb-calendar [showWeekNumber]="true" [date]="myDate (dateChange)="onDateChange($event)">
Where myDate: Date = new Date(); and onDateChange(newStart: Date): void { this.myDate = newStart; }
Moreover, now I have a new this new bug when I click on the Datepicker input: To replicate: <input type="text" autocomplete="off" nbInput fullWidth name="birthday" id="field_birthday" [disabled]="!canEdit" [nbDatepicker]="birthday" [(ngModel)]="_localCustomer.birthday"> <nb-datepicker #birthday [min]="minDate" [max]="maxDate">
Where: this.minDate = this.dateService.addYear(this.dateService.today(), -120); this.maxDate = this.dateService.addDay(this.dateService.today(), -1);
Moreover, I still have the same question that I already asked since january: are you planning to give the possibility to internationalize Calendar, DatePicker and now the new TimePicker components?