Ngx-bootstrap: TimePicker : [showSpinners]="false" not working

Created on 21 Feb 2017  路  6Comments  路  Source: valor-software/ngx-bootstrap

"ng2-bootstrap": "1.3.3",

angular 2.4.8.

showMeridian is working as expected, however if I try to hide the chevrons by setting showSpinners to false the chevrons are still their.

Although it seems that hidden is actualy added to the chevrons class.

<tr class="text-center hidden" ng-reflect-klass="text-center" ng-reflect-ng-class="[object Object]">
          <td><a class="btn btn-link" ng-reflect-klass="btn btn-link" ng-reflect-ng-class="[object Object]"><span class="glyphicon glyphicon-chevron-up"></span></a></td>
          <td>&nbsp;</td>
          <td><a class="btn btn-link" ng-reflect-klass="btn btn-link" ng-reflect-ng-class="[object Object]"><span class="glyphicon glyphicon-chevron-up"></span></a></td>
          <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><td ng-reflect-ng-class="[object Object]"></td>
        </tr>

comp(timepicker)

Most helpful comment

Was the fix released in 1.9.3 version ? If so, it looks like [showSpinners]="false" still does not work.

All 6 comments

I've placed showSpinner within a [hidden] tag instead of within the class and this seems to work perfectly.

template: "\n <table>\n <tbody>\n <tr [hidden]=\"!showSpinners\" class=\"text-center\" [ngClass]=\"{hidden: !showSpinners || readonlyInput}\">\n

any hack to fix this problem ? I was thinking about creating a TimePickerComponent but I was wondering if someone got an easier hack

I got round this by simply adding the hidden class;

.hidden { display: none; }

Was the fix released in 1.9.3 version ? If so, it looks like [showSpinners]="false" still does not work.

This still does not seem to work with Bootstrap 4.0.0 - [showSpinners]="false" has no effect on the display of arrows.

It does not work in bootstrap 4.
bootstrap migration guide

The .hidden and .show classes have been removed because they conflicted with jQuery鈥檚 $(...).hide() and $(...).show() methods. Instead, try toggling the [hidden] attribute or use inline styles like style="display: none;" and style="display: block;".

Now you can use workaroudn
.hidden { display: none; }

P.S. I made pull request for this. #4197

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghiscoding picture ghiscoding  路  3Comments

tpiros picture tpiros  路  3Comments

juanitavollmering picture juanitavollmering  路  3Comments

tuoitrexuquang picture tuoitrexuquang  路  3Comments

haisaco picture haisaco  路  3Comments