Questions tagged [ngb-datepicker]

82 questions
1
vote
1 answer

Angular free text datepicker that will auto populate slashes(MM/DD/YYYY)

I'm using the datepicker (ng-bootstrap) in a popup, I want this field also allow user to insert date manually (MM/DD/YYYY) but instead of asking user for entering slash it should auto populate slash. Angular 8 and @ng-bootstrap/ng-bootstrap, I…
bsp
  • 11
  • 5
1
vote
0 answers

How to use ngbDatepicker in for loop

I have a problem when using "ngbDatepicker" in form array. The date input cannot be opened. I think because the toggle() function cannot be called correctly. I have tried creating toggleDate function and call toggle() by using this…
1
vote
1 answer

ngbdatepicker disable dates objects dynamically

I am trying to disable only selected dates by the user. After multiple trials, I was able to do so, but it is disabling all the calendar. I want it to disable only the selected days. Current materials on ng-bootstrap, only disable days as numbers,…
AbdalRahman Farag
  • 197
  • 1
  • 8
  • 18
1
vote
1 answer

how calculate difference or compare(is bigger or not) between to data(Jalali calendar)

I use two ngb-datepicker in a page, of course jalali calendar, and bind to these two model: dateModelFrom: NgbDateStruct; dateModelTo: NgbDateStruct; after user select dates, i have 2 jalali date with ngb date structure: dateModelFrom = {day:…
user3400838
  • 55
  • 3
  • 10
1
vote
1 answer

NgBootstrap / NgbDatepicker with custom dayTemplate

I have a page with a NgbDatepicker with a custom dayTemplate to customize styles e show some other informations about each day: It looks pretty good but it is extremely slow, after some minutes the page starts freezing! I'm quite new on Angular 7…
manzapanza
  • 6,087
  • 4
  • 39
  • 48
1
vote
1 answer

Is there an onHidden event for the ngb-datepicker? If there isn't how do we add events to custom components in angular?

I am using the datepicker from this source: https://ng-bootstrap.github.io/#/components/datepicker/api And I would like to check if the ngb-datepicker is closed because I need to change the text of the button where it is triggered. template: …
bananaCute
  • 433
  • 5
  • 17
1
vote
2 answers

Get "Day" of Selected Date in ngb-datepicker (ng Bootstrap) in Angular Application

Demo: https://stackblitz.com/edit/angular-bife8z-px13fl?file=app%2Fdatepicker-basic.html I have added Day(Sunday) as static text, i want this to be changed according to date selection form calendar.
ItzMe_Ezhil
  • 1,276
  • 2
  • 11
  • 22
1
vote
1 answer

ngb-datepicker disable dates

I have been trying to disable weekends in my ngb-datepicker. I did not get a the desired output yet. Please see my code:
ebin
  • 191
  • 2
  • 5
1
vote
1 answer

ng-bootstrap datepicker formControl minDate maxDate

When setting [minDate] and [maxDate] it sets not only to datepicker, but also on . I want to set minDate and/or maxDate to datepicker which works, but the problem is at the moment when user types in invalid date by hand(that is greater or…
1
vote
2 answers

How to HighLight today's date in the ngbDatePicker in Angular 2+?

I'm working on an Angular 4 application where I use ngbDatePicker. Following the DatePicker HTML.
1
vote
0 answers

ngbDatepicker of ng-bootstrap is not working

I followed the solution mentioned here still I am getting the exception Uncaught Error: Template parse errors: There is no directive with "exportAs" set to "ngbDatepicker" ("
Sajin Surendran
  • 248
  • 6
  • 17
1
vote
0 answers

multiple ngbDatepicker in an ngFor loop

I have an array of data which is retrieved from a REST API. The user should be able to manipulate the data. The problem is that when several rows are shown (i.e. data1 array's length is larger than 1), it is the same date in all the #ds input…
Tompish
  • 11
  • 4
1
vote
1 answer

How to bind date from API to ng-bootstrap Datepicker in formGroup

Please find my issue below. I'm using Angular 5 formGroup and ngbDatepicker for date input. Date picker is working for new form, Please let me know how to bind the date to the date picker through formGroup & formControlName. Version of Angular and…
Dinesh N.K
  • 71
  • 2
  • 10
0
votes
0 answers

custom NgbDateAdapter to show date from NgbDatepicker in specific TimeZone

I have ngbDatePicker that works normally. I use { provide: NgbDateAdapter, useClass: NgbDateNativeAdapter, } as a provider in my component. What i want to achieve is via some custom DateAdapter to show a date in a specific time Zone. Now the…
jorkata
  • 11
  • 1
0
votes
1 answer

Why does the input ngbDatepicker convert numbers to dates?

In this HTML code, on input number "2", it automatically converts it to 04.01.2001:
Tudor123
  • 13
  • 3