it can be possible to use datepicker without input field. just click on the icon and then select a date and got date selection event
ngx-bootstrap: ^3.0.1
Angular: 6.0.6
Bootstrap: ^4.1.1
yes possible with #dp="bsDatepicker" (bsValueChange)="onShown($event)">
Thanks
Hi @ShaileshInfyom, how can I pass the current value for the datepicker? With an input, a [(ngModel)] does the job, but I can't use that without an input.
Thanks!
Here's a more complete example:
<!-- Button to open calendar -->
<button type="button" (click)="d.toggle()">
Open Calendar
</button>
<!-- Calendar -->
<span bsDatepicker
#d="bsDatepicker"
placement="right" <!-- config inline -->
[bsConfig]="dateConfig" <!-- config stored in component variable-->
[bsValue]="date" <!-- initial value-->
(bsValueChange)="onShown($event)"></span>