Comments (4)
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.
Yep, it's an issue with 1.12.0 and angular < 1.6
from angular-material-datetimepicker.
Fixed by b357003
from angular-material-datetimepicker.
https://github.com/beenote/angular-material-datetimepicker/releases/tag/v1.13.0
from angular-material-datetimepicker.
Related Issues (20)
- min time and max time HOT 1
- Add mdDialog hasBackdrop option HOT 4
- Add am/pm text customization HOT 2
- Do you have this in a non-angular version? HOT 1
- Could not find a declaration HOT 1
- Setting shortTime=true on a date picker shows AM/PM indicator HOT 4
- Picker icons cause layout issues, show-icon enables too many options HOT 8
- Month displayed is not the same as month view HOT 5
- Upgrade angular library HOT 1
- Cannot set default values for all params of the directive. HOT 1
- Support clearing date from dialog HOT 2
- unable to load datetime picker on dialog box. HOT 5
- ng-change not being triggered as expected and validation failing HOT 5
- If ng-disabled is true. Input field is disabled but buttons are not HOT 4
- Date part is lost when editing time HOT 4
- Which Angular Version? HOT 1
- Option to edit both date and time at the same time on dialog? HOT 1
- Not compatible with Angular 1.8
- User cannot use blue bubble on the clock to set time on Firefox HOT 1
- Min/max date comparison is apparently not timezone-safe HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-material-datetimepicker.