We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26b76bd commit 7898779Copy full SHA for 7898779
js/angular-material-datetimepicker.js
@@ -159,10 +159,9 @@ function ngMaterialDatePicker(moment) {
159
}
160
161
if (ngModel) {
162
- ngModel.$options = ngModel.$options.createChild({
163
- '*': '$inherit',
164
- debounce: 500
165
- });
+ var ngModelOptions = {'*': '$inherit', debounce: 500};
+ ngModel.$options = ngModel.$options ? ngModel.$options.createChild(ngModelOptions) : ngModelOptions;
+
166
ngModel.$formatters.push(function (value) {
167
if (typeof value === 'undefined') return;
168
var m = moment(value);
0 commit comments