zhaber / ng-bootstrap-datetimepicker

:calendar::clock2: Angular Bootstrap Date Time Picker
MIT License
149 stars 57 forks source link

Problems using alongside ng-csp #141

Closed mchapman closed 6 years ago

mchapman commented 6 years ago

When used with the ng-csp directive the datepicker doesn't open. Furthermore, seconds become editable (in a pretty ugly way).

See plunker - only difference from demo in readme is the ng-csp.

zhaber commented 6 years ago

Caused by uib-timepicker that does not support ng-csp (issue tracker https://github.com/angular-ui/bootstrap/issues )

http://plnkr.co/edit/Mzus58UeY5Gc7sjavy7n?p=preview

mchapman commented 6 years ago

Not sure you are right, but you prompted me to look a bit further and I came across https://github.com/angular-ui/bootstrap/issues/6419. Adding the CSS fixes the pop-up issue but not the seconds input (which I don't actually get in my app anyway). Perhaps you should add the css to yours? I could submit a PR but I suspect you will do it 5 times as fast.

zhaber commented 6 years ago

I updated the issue you referenced with timepicker behavior, however, according to README in the main project, it was closed and new requests are not accepted.

mchapman commented 6 years ago

I was suggesting that you add the CSS from https://github.com/angular-ui/bootstrap/blob/master/src/datepickerPopup/popup.css to https://github.com/zhaber/angular-js-bootstrap-datetimepicker/blob/master/datetimepicker.css. That will provide a partial (at least) fix I think.

zhaber commented 6 years ago

This css is one of angular-ui dependencies, so if you use a depedency manager such as npm it should already be in your project file tree.