Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install datepicker only from ng-bootstrap

I want to use datepicker from ng-bootstrap package: https://ng-bootstrap.github.io/#/components/datepicker/overview

Is there any way to install only the datepicker and its dependencies instead of all the package?

like image 526
Eliran Avatar asked Jan 18 '26 11:01

Eliran


1 Answers

You can't install only the datepicker, but you can import only the datepicker in your project.

The ng-boostrap exports all the sub modules, if you want to use only the datepicker you can import only the datepicker :

...
import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap';
...
@NgModule({
  imports: [..., NgbDatepickerModule.forRoot()],
  ...

When you will build your project, only this module from ng-bootstrap will be added to your bundle.

like image 78
ibenjelloun Avatar answered Jan 21 '26 02:01

ibenjelloun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!