I am new to Angular 2+. I am trying to integrate Bootstrap 3 Datepicker in AngularJS2. I used the [solution]: How to use Bootstrap 3 Datepicker in angular 2. But got error like
Cannot find name '$'
Is there any way to implement the task with or without jquery?
My code given below.
index.html
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script
src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"
integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30="
crossorigin="anonymous"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"> </script>
new-job.component.html
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input type='text' class="form-control" id='proposed_start_at' formControlName="proposed_start_at" #proposed_start_at/>
<label class="mdl-textfield__label" for="proposed_start_at">Start Time</label>
</div>
new-job.component.ts
@ViewChild("proposed_start_at")
public startDateElementRef: ElementRef;
ngAfterViewInit() {
$(this.startDateElementRef.nativeElement).datetimepicker({format: 'LT'});
}
I want to implement datetimepicker which is given in [link]: https://eonasdan.github.io/bootstrap-datetimepicker/