Giter Club home page Giter Club logo

Comments (4)

ptitdam2001 avatar ptitdam2001 commented on August 11, 2024

Hi there is a bug onto the version 1.12.0 with angular 1.5.9.

A the end of the process, we have that error

TypeError: Cannot read property 'timezone' of undefined at eval (angular-material-datetimepicker.js:259) at processQueue (angular.js:16606) at eval (angular.js:16622) at Scope.$eval (angular.js:17913) at Scope.$digest (angular.js:17727) at eval (angular.js:17952) at completeOutstandingRequest (angular.js:6035) at eval (angular.js:6314)
The line 259 is if (ngModel.$options.$$options.timezone) {, I think you should define ngModel.$options.$$options if not defined.

If I add the attribute ng-model-options, I have the error below:

angular.js:14110 TypeError: ngModel.$options.createChild is not a function at Object.link (webpack:///./node_modules/ng-material-datetimepicker/js/angular-material-datetimepicker.js?:208:70) at eval (webpack:///./node_modules/angular/angular.js?:1259:18) at eval (webpack:///./node_modules/angular/angular.js?:10089:44) at invokeLinkFn (webpack:///./node_modules/angular/angular.js?:10095:9) at nodeLinkFn (webpack:///./node_modules/angular/angular.js?:9492:11) at compositeLinkFn (webpack:///./node_modules/angular/angular.js?:8757:13) at nodeLinkFn (webpack:///./node_modules/angular/angular.js?:9486:11) at compositeLinkFn (webpack:///./node_modules/angular/angular.js?:8757:13) at nodeLinkFn (webpack:///./node_modules/angular/angular.js?:9486:11) at compositeLinkFn (webpack:///./node_modules/angular/angular.js?:8757:13) <input mdc-datetime-picker="" id="datetime-picker" date="true" time="true" type="text" format="DD-MM-YYYY HH:mm" min-date="$ctrl.minDate" ng-model="$ctrl.ngModel" ng-model-options="{ timezone: 'utc' }" readonly="readonly" ng-required="!$ctrl.ngRequired" ng-disabled="$ctrl.ngDisabled" ng-change="$ctrl.ngChange()" cancel-text="{{ 'datepicker.cancel' | translate }}" today-text="{{ 'datepicker.today' | translate }}" ok-text="{{ 'datepicker.ok' | translate }}" week-start="1" placeholder="{{$ctrl.placeholder}}" class="ng-pristine ng-untouched ng-valid ng-isolate-scope">

May be it comes from me but the component is working with the version 1.11.0

from angular-material-datetimepicker.

hexadecy avatar hexadecy commented on August 11, 2024

Yep, it's an issue with 1.12.0 and angular < 1.6

from angular-material-datetimepicker.

hexadecy avatar hexadecy commented on August 11, 2024

Fixed by b357003

from angular-material-datetimepicker.

hexadecy avatar hexadecy commented on August 11, 2024

https://github.com/beenote/angular-material-datetimepicker/releases/tag/v1.13.0

from angular-material-datetimepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.