仅在选择日期时选择日期

时间:2017-08-10 10:37:04

标签: angular ngx-bootstrap

我使用ngx-bootstrap并遵循this之类的不同实施建议或here中提出的解决方案。如果我像

一样使用它
<div class="input-group-addon datepickerCLS" dropdown (click)="toggleCalendar($event)"
      (clickOutside)="closeCalendar($event)" [isOpen]="showCal">
<button dropdownToggle type="button" class="glyphicon glyphicon-calendar datepickerCLS" aria-hidden="true">
</button>
<div class="dropdown-menu dropdown-menu-right" >
 <datepicker [(ngModel)]="internalDate" 
             [startingDay]="startD" [showWeeks]="true" 
             (selectionDone)="setDate()">
 </datepicker>
</div>
</div>

比用户通过

更改日期时收到通知
  1. 日选择
  2. 月选择
  3. 年度选择
  4. 区分日选和月选或周选。我知道我可以添加类似

    的内容
    (click)="checkPath($event)"
    

    并评估event.path()是否包含daypicker, monthpicker or yearpicker。但是这种方法仅适用于Chrome中的 ,而不适用于FF。

    如果在当天选择或其他一些选择中有没有办法区分被发现的事件?

0 个答案:

没有答案
相关问题