zhaber / ng-bootstrap-datetimepicker

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

Error: [ng:cpws] Can't copy! Making copies of Window or Scope instances is not supported #132

Closed ncrocfer closed 7 years ago

ncrocfer commented 7 years ago

Hello,

I have a ng:cpws error using your this plugin and the yeoman genenator :

datepicker_angular

I simply generate a new angular project :

app/views/main.html

<datetimepicker data-ng-model="main.date" date-format="dd-MMM-yyyy"></datetimepicker>

app/scripts/app.js

$routeProvider
      .when('/', {
        templateUrl: 'views/main.html',
        controller: 'MainCtrl',
        controllerAs: 'main'
      })
     .otherwise({
        redirectTo: '/'
      });
  });

app/scripts/controllers/main.js

angular.module('nodejsApp')
  .controller('MainCtrl', function () {
    this.date = new Date();
  });

It does not work, with or without any custom options...

Do you have an idea please ?

alexsk commented 7 years ago

+1 The issue appears in angular v1.6.x. Angular v1.5.x works ok.

zhaber commented 7 years ago

I changed the way an inner form is isolated to fix the initialization issue.

MGouaillier4CT commented 7 years ago

Hello, i'm also using this componnent and i'm confronted to the same issue. I've seen your update (isolateForm) and it's fixing the problem.

My question is : When will you realease an updated version with this bug fix ?

Thanks for your time

zhaber commented 7 years ago

Updated plugin version

c-amedicha commented 7 years ago

I have the latest updated code but the issue still persists for angular version 1.6 or above . image

Does any one else get the same issue with the latest plugin version?

zhaber commented 7 years ago

Do you have plunkr where we can reproduce it?

c-amedicha commented 7 years ago

Please find the Plunker here: http://plnkr.co/edit/2jyyaQuiRmlfS18qZjz1?p=preview When you try to edit the date in the input, it throws the error. image

zhaber commented 7 years ago

You can try the latest commit now. Plunker: http://plnkr.co/edit/qRhNlfTWlt9wIexa3WbB?p=preview

c-amedicha commented 7 years ago

Thank you for fixing it. It works well now!!